diff --git a/packages/suite/src/constants/suite/firmware.ts b/packages/suite/src/constants/suite/firmware.ts index 1a3409e2d59..3ba22d023f7 100644 --- a/packages/suite/src/constants/suite/firmware.ts +++ b/packages/suite/src/constants/suite/firmware.ts @@ -6,7 +6,7 @@ import { FilterPropertiesByType } from '@trezor/type-utils'; * see suite-native/device/src/config/firmware.ts for Suite Lite */ -type BehaviorBaseType = { shouldReport: boolean; debugOnly?: boolean }; +type BehaviorBaseType = { shouldReport: boolean }; // will be ignored completely type SkippedBehavior = BehaviorBaseType & { type: 'skipped' }; @@ -45,9 +45,3 @@ export type SkippedHashCheckError = keyof FilterPropertiesByType< export const isSkippedHashCheckError = ( error: FirmwareHashCheckError, ): error is SkippedHashCheckError => hashCheckErrorScenarios[error].type === 'skipped'; - -export const isDebugOnlyRevisionCheckError = (error: FirmwareRevisionCheckError): boolean => - (revisionCheckErrorScenarios[error] as RevisionErrorBehavior).debugOnly ?? false; - -export const isDebugOnlyHashCheckError = (error: FirmwareHashCheckError): boolean => - (hashCheckErrorScenarios[error] as HashErrorBehavior).debugOnly ?? false; diff --git a/packages/suite/src/reducers/suite/suiteReducer.ts b/packages/suite/src/reducers/suite/suiteReducer.ts index 2c54237ec4b..205ca4fdea7 100644 --- a/packages/suite/src/reducers/suite/suiteReducer.ts +++ b/packages/suite/src/reducers/suite/suiteReducer.ts @@ -21,8 +21,6 @@ import type { Locale } from 'src/config/suite/languages'; import { ExperimentalFeature } from 'src/constants/suite/experimental'; import { hashCheckErrorScenarios, - isDebugOnlyHashCheckError, - isDebugOnlyRevisionCheckError, isSkippedHashCheckError, revisionCheckErrorScenarios, } from 'src/constants/suite/firmware'; @@ -531,10 +529,6 @@ export const selectFirmwareRevisionCheckErrorIfEnabled = (state: AppState) => { const isDisabledByMessageSystem = selectIsFeatureDisabled(state, Feature.firmwareRevisionCheck); if (isDisabledByMessageSystem) return null; - const isHiddenBehindDebug = - isDebugOnlyRevisionCheckError(revisionCheckError) && !selectIsDebugModeActive(state); - if (isHiddenBehindDebug) return null; - return revisionCheckError; }; @@ -564,10 +558,6 @@ export const selectFirmwareHashCheckErrorIfEnabled = (state: AppState) => { const isDisabledByMessageSystem = selectIsFeatureDisabled(state, Feature.firmwareHashCheck); if (isDisabledByMessageSystem) return null; - const isHiddenBehindDebug = - isDebugOnlyHashCheckError(hashCheckError) && !selectIsDebugModeActive(state); - if (isHiddenBehindDebug) return null; - if ( hashCheckError === 'other-error' && selectIsFeatureDisabled(state, Feature.firmwareHashCheckOtherError)