Skip to content

Commit

Permalink
fixup! feat(suite-native): add settings state & selectors for FW revi…
Browse files Browse the repository at this point in the history
…sion check
  • Loading branch information
Lemonexe committed Jan 29, 2025
1 parent 8f8aac2 commit 99a67e1
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 11 deletions.
7 changes: 3 additions & 4 deletions packages/suite/src/constants/suite/firmware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import { FilterPropertiesByType } from '@trezor/type-utils';
import { isDevEnv } from '@suite-common/suite-utils';

/*
* Various scenarios how firmware authenticity check errors are handled in Suite
* see suite-native/config/src/firmware.ts for Suite Lite
* Various scenarios how firmware authenticity check errors are handled
*/

// will be ignored completely
type SkippedBehavior = { type: 'skipped'; shouldReport: boolean };
// display a warning banner
// display `SuiteBanners` warning
type SoftWarningBehavior = { type: 'softWarning'; shouldReport: true };
// display "Device Compromised" modal, after closing it dispaly a warning banner, block receiving address
// display `SuiteBanners`, show `DeviceCompromised` modal, block receiving address
type HardModalBehavior = { type: 'hardModal'; shouldReport: true };

type RevisionErrorBehavior = SoftWarningBehavior | HardModalBehavior;
Expand Down
3 changes: 1 addition & 2 deletions suite-native/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"dependencies": {
"@mobily/ts-belt": "^3.13.1",
"@suite-common/wallet-config": "workspace:*",
"@suite-common/wallet-utils": "workspace:*",
"@trezor/connect": "workspace:*"
"@suite-common/wallet-utils": "workspace:*"
}
}
1 change: 0 additions & 1 deletion suite-native/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './environment';
export * from './supportedNetworks';
export * from './firmware';
3 changes: 1 addition & 2 deletions suite-native/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
},
{
"path": "../../suite-common/wallet-utils"
},
{ "path": "../../packages/connect" }
}
]
}
File renamed without changes.
1 change: 1 addition & 0 deletions suite-native/device/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ export * from './components/DeviceImage';
export * from './utils';
export * from './selectors';
export * from './deviceThunks';
export * from './config/firmware';
2 changes: 1 addition & 1 deletion suite-native/device/src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
} from '@suite-common/wallet-core';
import { isDeviceAcquired } from '@suite-common/suite-utils';
import { getAccountFiatBalance } from '@suite-common/wallet-utils';
import { revisionCheckErrorScenarios } from '@suite-native/config';
import { selectFiatCurrencyCode, SettingsSliceRootState } from '@suite-native/settings';
import { BigNumber } from '@trezor/utils';
import { Account, RatesByKey } from '@suite-common/wallet-types';
Expand All @@ -37,6 +36,7 @@ import {
} from '@suite-native/feature-flags';

import { isFirmwareVersionSupported } from './utils';
import { revisionCheckErrorScenarios } from './config/firmware';

type NativeDeviceRootState = DeviceRootState &
AccountsRootState &
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10200,7 +10200,6 @@ __metadata:
"@mobily/ts-belt": "npm:^3.13.1"
"@suite-common/wallet-config": "workspace:*"
"@suite-common/wallet-utils": "workspace:*"
"@trezor/connect": "workspace:*"
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 99a67e1

Please sign in to comment.