-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(mobile): Device Settings for FW revision check #16435
base: develop
Are you sure you want to change the base?
Conversation
🚀 Expo preview is ready!
|
2dcc93f
to
a91440a
Compare
@@ -112,7 +112,7 @@ export const HELP_CENTER_EVM_ADDRESS_CHECKSUM: Url = | |||
export const HELP_CENTER_EVM_SEND_TO_CONTRACT_URL = | |||
'https://trezor.io/support/a/where-is-my-ethereum'; | |||
export const HELP_CENTER_FIRMWARE_REVISION_CHECK: Url = | |||
'https://trezor.io/learn/a/trezor-firmware-revision-check'; | |||
'https://trezor.io/learn/a/trezor-firmware-authenticity-check'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incidental fix of outdated URL, you can see that the former 308's to the new one
type SoftWarningBehavior = { type: 'softWarning'; shouldReport: true }; | ||
// display `SuiteBanners`, show `DeviceCompromised` modal, block receiving address | ||
// display "Device Compromised" modal, after closing it dispaly a warning banner, block receiving address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the suite config. I only reworded comments to match the new mobile config (see same-named file below)
DeviceAuthenticityStackParamList, | ||
DeviceAuthenticityStackRoutes, | ||
DeviceSettingsStackParamList | ||
>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw is there any simpler way than having to boilerplate everytime we need to navigate? 🤔
"@suite-native/toasts": "workspace:*", | ||
"@trezor/connect": "workspace:*", | ||
"@trezor/device-utils": "workspace:*", | ||
"@trezor/env-utils": "workspace:*", | ||
"@trezor/styles": "workspace:*", | ||
"@trezor/urls": "workspace:*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is first time @trezor/urls
are used in suite-native altogether. Is that alright, or would you prefer me duplicating them somewhere in suite-native
? 🤔
@@ -504,6 +505,32 @@ export const en = { | |||
}, | |||
}, | |||
}, | |||
advancedSettings: { | |||
title: 'Advanced settings', | |||
subtitle: 'Very nerdy stuff here', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other copies are likely final.
a91440a
to
721ae36
Compare
'firmware-version-unknown': { type: 'hardModal', shouldReport: true }, | ||
'cannot-perform-check-offline': { type: 'softWarning', shouldReport: true }, | ||
'other-error': { type: 'softWarning', shouldReport: true }, | ||
} satisfies RevisionCheckErrorScenarios; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file may seem like overkill, but the experience on Suite Desktop/web shown that having the ifs distributed across components is untenable. We were changing it a lot, especially hash check 🙉
See same-named file above for full config.
In mobile we start with only revision check, but we'll add hash check too eventually.
Description
🚧 Depends on #16455 and #16454
👁️ CR commit by commit is recommended ℹ️ you may skip first 2 commits (extracted to sub-PRs):
feat(icons): add code icon to native, regenerate
= #16455feat(suite-native): add more params to IconListItem for reusability
= #16454Related Issue
Resolve #16447
Screenshots:
Device Settings:
Feature flag Firmware Revision check = off is unchanged
Feature flag Firmware Revision check = on:
On press Advanced Setings section go to Advanced Settings:
On press Turn off button go to Turn off modal:
On press checkbox:
Back to Advanced settings, but Turn on the button now turns it on instantly: