Skip to content

Commit

Permalink
feat(message-system): let other-error UI be disabled remotely
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemonexe committed Mar 4, 2025
1 parent ab8c71e commit eb12b74
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/suite/src/reducers/suite/suiteReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,13 @@ export const selectFirmwareHashCheckErrorIfEnabled = (state: AppState) => {
isDebugOnlyHashCheckError(hashCheckError) && !selectIsDebugModeActive(state);
if (isHiddenBehindDebug) return null;

if (
hashCheckError === 'other-error' &&
selectIsFeatureDisabled(state, Feature.firmwareHashCheckOtherError)
) {
return null;
}

return hashCheckError;
};

Expand Down
3 changes: 3 additions & 0 deletions suite-common/message-system/src/messageSystemTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type MessageSystemRootState = {
messageSystem: MessageSystemState;
};

// Note: do not rename the feature flag identifiers (otherwise, both old & new would have to be targetted by a message system release)
export const Feature = {
coinjoin: 'coinjoin',
killswitch: 'killswitch',
Expand All @@ -35,6 +36,8 @@ export const Feature = {
firmwareRevisionCheck: 'security.firmware.revisionCheck',
firmwareRevisionCheckMobile: 'security.firmware.revisionCheck.mobile',
firmwareHashCheck: 'security.firmware.hashCheck',
// subset of `firmwareHashCheck`: can turn off specifically UI for other-error result
firmwareHashCheckOtherError: 'security.firmware.hashCheck.otherError',
entropyCheck: 'security.entropyCheck',
// FW update feature flag implemented only for mobile app
firmwareUpdate: 'device.firmware.update',
Expand Down

0 comments on commit eb12b74

Please sign in to comment.