-
-
Notifications
You must be signed in to change notification settings - Fork 279
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): firmware upgrade #15184
Conversation
a57b375
to
898e243
Compare
3bc13b7
to
1d9c900
Compare
0fdc1c2
to
f8fe6b0
Compare
import { tryLocalAssetRequire } from './assetUtils'; | ||
|
||
export const httpRequest = (url: string, _type: string): any => tryLocalAssetRequire(url); | ||
export function httpRequest<T extends HttpRequestType>( |
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 might close this issue too, right? #13271
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.
Yes, I think it should, be we should test it including FW translations.
635c080
to
e8cb1e7
Compare
🚀 Expo preview is ready!
|
991adca
to
03c6bd9
Compare
57aaea9
to
7e82d6e
Compare
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.
Approving of c3daee4. I noticed that useFirmware
didn't make much sense anymore and its logic could be split between components and selectors. I didn't want to bother you with it as it is out of scope so I did it myself and added the commits 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.
I was looking mostly into the suite-native
part.
resetReducer, | ||
translatedText, | ||
mayBeStucked, | ||
} = useFirmware({}); |
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.
} = useFirmware({}); | |
} = useFirmware(); |
Please set params = {}
as default value in native useFirmware
.
suite-native/firmware/src/screens/FirmwareUpdateInProgressScreen.tsx
Outdated
Show resolved
Hide resolved
suite-native/module-authorize-device/src/hooks/useOnDeviceReadyNavigation.ts
Show resolved
Hide resolved
suite-native/module-device-settings/src/components/DeviceFirmwareCard.tsx
Outdated
Show resolved
Hide resolved
return; | ||
} | ||
setTimeout(() => { | ||
// setting this to false will trigger standart device connection flow |
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.
// setting this to false will trigger standart device connection flow | |
// setting this to false will trigger standard device connection flow |
}, []); | ||
|
||
const handleContactSupport = useCallback(() => { | ||
Linking.openURL('https://trezor.io/support'); |
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.
We already have SUITE_LITE_SUPPORT_URL
from @suite-native/link
on different places. Would it make sense to use the same URL?
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.
Definitely
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.
fixed 61b3b75
suite-native/module-device-settings/src/components/DeviceFirmwareCard.tsx
Outdated
Show resolved
Hide resolved
suite-native/module-device-settings/src/screens/ContinueOnTrezorScreen.tsx
Show resolved
Hide resolved
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.
ack connect part. did not test
suite-native/module-device-settings/src/components/DeviceFirmwareCard.tsx
Show resolved
Hide resolved
suite-native/module-device-settings/src/navigation/DeviceSettingsStackNavigator.tsx
Show resolved
Hide resolved
7e82d6e
to
61b3b75
Compare
Fingerprint is changed, new EAS Build(s) are now in pipeline. Build with commit f0cdf36
Fingerprint diff[
{
"op": "changed",
"beforeSource": {
"type": "contents",
"id": "expoConfig",
"contents": "{\"android\":{\"adaptiveIcon\":{\"backgroundColor\":\"#E59D17\",\"foregroundImage\":\"./assets/appIcon_android.png\",\"monochromeImage\":\"./assets/appIcon_android.png\"},\"intentFilters\":[{\"action\":\"VIEW\",\"autoVerify\":true,\"category\":[\"BROWSABLE\",\"DEFAULT\"],\"data\":[{\"host\":\"dev.suite.sldev.cz\",\"pathPattern\":\"/connect/.*/.*/deeplink/.*\",\"scheme\":\"https\"},{\"host\":\"dev.suite.sldev.cz\",\"pathPattern\":\"/connect/.*/deeplink/.*\",\"scheme\":\"https\"}]}],\"package\":\"io.trezor.suite.preview\",\"permissions\":[\"android.permission.CAMERA\"]},\"androidStatusBar\":{\"backgroundColor\":\"#25292E\"},\"extra\":{\"commitHash\":\"f7dd25b803538b443f07f880f4fdceaa4faadd1a\",\"eas\":{\"projectId\":\"15998f8a-e75c-4b60-959d-6f68e5ff4936\"}},\"ios\":{\"associatedDomains\":[\"applinks:dev.suite.sldev.cz\"],\"bundleIdentifier\":\"io.trezor.suite.preview\",\"icon\":\"./assets/preview/appIcon.png\",\"infoPlist\":{\"ITSAppUsesNonExemptEncryption\":false,\"NSAppTransportSecurity\":{\"NSAllowsArbitraryLoads\":true,\"NSExceptionDomains\":{\"data.trezor.io\":{\"NSExceptionAllowsInsecureHTTPLoads\":true,\"NSIncludesSubdomains\":true},\"localhost\":{\"NSExceptionAllowsInsecureHTTPLoads\":true}}},\"NSCameraUsageDescription\":\"$(PRODUCT_NAME) needs access to your Camera to scan your XPUB.\",\"NSFaceIDUsageDescription\":\"$(PRODUCT_NAME) needs Face ID and Touch ID to keep sensitive data about your portfolio private.\",\"NSMicrophoneUsageDescription\":\"This app does not require access to the microphone.\",\"UIRequiredDeviceCapabilities\":[\"armv7\"]},\"supportsTablet\":true},\"name\":\"Trezor Suite Lite Preview\",\"orientation\":\"portrait\",\"owner\":\"trezorcompany-develop\",\"platforms\":[\"android\",\"ios\"],\"plugins\":[\"./plugins/withGradleProperties.js\",\"./plugins/withRemoveXcodeLocalEnv.js\",\"./plugins/withRemoveiOSNotificationEntitlement.js\",\"@trezor/react-native-usb/plugins/withUSBDevice.js\",[\"./plugins/withAndroidMainActivityAttributes.js\",{\"android:allowBackup\":false}],[\"@config-plugins/detox\",{\"subdomains\":\"*\"}],[\"@sentry/react-native/expo\",{\"organization\":\"satoshilabs\",\"project\":\"suite-native\",\"url\":\"https://sentry.io/\"}],[\"expo-build-properties\",{\"android\":{\"kotlinVersion\":\"1.9.24\",\"minSdkVersion\":28},\"ios\":{\"deploymentTarget\":\"15.1\"}}],[\"expo-camera\",{\"cameraPermission\":\"Allow $(PRODUCT_NAME) to access camera for QR code scanning.\",\"microphonePermission\":false,\"recordAudioAndroid\":false}],[\"expo-font\",{\"fonts\":[\"../../packages/theme/fonts/TTSatoshi-DemiBold.otf\",\"../../packages/theme/fonts/TTSatoshi-Medium.otf\",\"../../suite-common/icons/iconFontsMobile/TrezorSuiteIcons.ttf\"]}],[\"expo-image-picker\",{\"microphonePermission\":false,\"photosPermission\":\"Allow $(PRODUCT_NAME) to access your photos to let you import QR code images.\"}],[\"expo-splash-screen\",{\"backgroundColor\":\"#25292E\",\"image\":\"./assets/splash_icon.png\",\"imageWidth\":\"200\"}],[\"expo-video\"]],\"runtimeVersion\":\"16\",\"scheme\":\"trezorsuitelite\",\"sdkVersion\":\"52.0.0\",\"slug\":\"trezor-suite-preview\",\"updates\":{\"requestHeaders\":{\"expo-channel-name\":\"preview\"},\"url\":\"https://u.expo.dev/15998f8a-e75c-4b60-959d-6f68e5ff4936\"},\"userInterfaceStyle\":\"automatic\",\"version\":\"24.11.3\"}",
"reasons": [
"expoConfig"
],
"hash": "c94fb4164b1c5564bf4940721e0c1417d96ad47c"
},
"afterSource": {
"type": "contents",
"id": "expoConfig",
"contents": "{\"android\":{\"adaptiveIcon\":{\"backgroundColor\":\"#E59D17\",\"foregroundImage\":\"./assets/appIcon_android.png\",\"monochromeImage\":\"./assets/appIcon_android.png\"},\"intentFilters\":[{\"action\":\"VIEW\",\"autoVerify\":true,\"category\":[\"BROWSABLE\",\"DEFAULT\"],\"data\":[{\"host\":\"dev.suite.sldev.cz\",\"pathPattern\":\"/connect/.*/.*/deeplink/.*\",\"scheme\":\"https\"},{\"host\":\"dev.suite.sldev.cz\",\"pathPattern\":\"/connect/.*/deeplink/.*\",\"scheme\":\"https\"}]}],\"package\":\"io.trezor.suite.preview\",\"permissions\":[\"android.permission.CAMERA\"]},\"androidStatusBar\":{\"backgroundColor\":\"#25292E\"},\"extra\":{\"commitHash\":\"e735cb3895c6208a59e09f1f7b2d0f20512c827a\",\"eas\":{\"projectId\":\"15998f8a-e75c-4b60-959d-6f68e5ff4936\"}},\"ios\":{\"associatedDomains\":[\"applinks:dev.suite.sldev.cz\"],\"bundleIdentifier\":\"io.trezor.suite.preview\",\"icon\":\"./assets/preview/appIcon.png\",\"infoPlist\":{\"ITSAppUsesNonExemptEncryption\":false,\"NSAppTransportSecurity\":{\"NSAllowsArbitraryLoads\":true,\"NSExceptionDomains\":{\"data.trezor.io\":{\"NSExceptionAllowsInsecureHTTPLoads\":true,\"NSIncludesSubdomains\":true},\"localhost\":{\"NSExceptionAllowsInsecureHTTPLoads\":true}}},\"NSCameraUsageDescription\":\"$(PRODUCT_NAME) needs access to your Camera to scan your XPUB.\",\"NSFaceIDUsageDescription\":\"$(PRODUCT_NAME) needs Face ID and Touch ID to keep sensitive data about your portfolio private.\",\"NSMicrophoneUsageDescription\":\"This app does not require access to the microphone.\",\"UIRequiredDeviceCapabilities\":[\"armv7\"]},\"supportsTablet\":true},\"name\":\"Trezor Suite Lite Preview\",\"orientation\":\"portrait\",\"owner\":\"trezorcompany-develop\",\"platforms\":[\"android\",\"ios\"],\"plugins\":[\"./plugins/withGradleProperties.js\",\"./plugins/withRemoveXcodeLocalEnv.js\",\"./plugins/withRemoveiOSNotificationEntitlement.js\",\"@trezor/react-native-usb/plugins/withUSBDevice.js\",[\"./plugins/withAndroidMainActivityAttributes.js\",{\"android:allowBackup\":false}],[\"@config-plugins/detox\",{\"subdomains\":\"*\"}],[\"@sentry/react-native/expo\",{\"organization\":\"satoshilabs\",\"project\":\"suite-native\",\"url\":\"https://sentry.io/\"}],[\"expo-build-properties\",{\"android\":{\"kotlinVersion\":\"1.9.24\",\"minSdkVersion\":28},\"ios\":{\"deploymentTarget\":\"15.1\"}}],[\"expo-camera\",{\"cameraPermission\":\"Allow $(PRODUCT_NAME) to access camera for QR code scanning.\",\"microphonePermission\":false,\"recordAudioAndroid\":false}],[\"expo-font\",{\"fonts\":[\"../../packages/theme/fonts/TTSatoshi-DemiBold.otf\",\"../../packages/theme/fonts/TTSatoshi-Medium.otf\",\"../../suite-common/icons/iconFontsMobile/TrezorSuiteIcons.ttf\"]}],[\"expo-image-picker\",{\"microphonePermission\":false,\"photosPermission\":\"Allow $(PRODUCT_NAME) to access your photos to let you import QR code images.\"}],[\"expo-splash-screen\",{\"backgroundColor\":\"#25292E\",\"image\":\"./assets/splash_icon.png\",\"imageWidth\":\"200\"}],[\"expo-video\"]],\"runtimeVersion\":\"17\",\"scheme\":\"trezorsuitelite\",\"sdkVersion\":\"52.0.0\",\"slug\":\"trezor-suite-preview\",\"updates\":{\"requestHeaders\":{\"expo-channel-name\":\"preview\"},\"url\":\"https://u.expo.dev/15998f8a-e75c-4b60-959d-6f68e5ff4936\"},\"userInterfaceStyle\":\"automatic\",\"version\":\"24.11.3\"}",
"reasons": [
"expoConfig"
],
"hash": "a6d66dc8e19e612ed555ff888e5d8a69f6aab5e5"
}
}
]
|
61b3b75
to
f0cdf36
Compare
f0cdf36
to
2544975
Compare
It's quite huge but lot of changes are just moving things around. Check it commit by commit for easier review.
Description
Doesn't work or not implemented yet
=> #15584
Notes for QA
What not to test
What to test
What if it gets stuck?
(pressing buttons does nothing for now) and it should dissapear when something happens (progress or user accepts button request on device)Related Issue
Resolve #14614
Screenshots: