Skip to content
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

Mobile - Solana send polishing #15957

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

vytick
Copy link
Contributor

@vytick vytick commented Dec 13, 2024

  • Remove unused thunk
  • Fetch for Solana updates to better estimate fees already on outputs screen

@vytick vytick added the mobile Suite Lite issues and PRs label Dec 13, 2024
@vytick vytick requested a review from a team as a code owner December 13, 2024 11:48
Copy link

github-actions bot commented Dec 13, 2024

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 21
  • More info

Learn more about 𝝠 Expo Github Action

};
}
}, [account]);
useSubscribeForSolanaBlockUpdates(account);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SendOutputsScreen is not unmounted when SendFeesScreen is active, so the subscription is already active here, is that intentional? I guess it's not a problem and probably a bit safer to subscribe on both screens, but if you remove it from here, it should still works the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeKne Mentioned the same thing. The intention was to make it work when coming to fee screen via different flow (trade), without specifying txn outputs.

I'll revisit this once more with other things we discussed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed in db7b7ff

@@ -210,7 +213,8 @@ export const SendOutputsScreen = ({
setValue('rippleDestinationTag', sendFormDraft.rippleDestinationTag, {
shouldTouch: true,
});
await calculateNormalFeeMaxAmount();
// The max amount is equal to the total token balance for tokens. (fee is paid in mainnet currency)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calculations for max should not be done in case tokens are sent. This will cause error at least on solana

@PeKne PeKne changed the title Mobile - send polishing Mobile - Solana send polishing Dec 16, 2024
@vytick vytick force-pushed the feat/native/solana-send-tweaking branch from db7b7ff to 267d655 Compare December 16, 2024 13:23
@vytick
Copy link
Contributor Author

vytick commented Dec 17, 2024

/rebase

Copy link

@trezor-ci trezor-ci force-pushed the feat/native/solana-send-tweaking branch from 267d655 to ee7a2a8 Compare December 17, 2024 12:28
Copy link

Fingerprint is changed, new EAS Build(s) are now in pipeline.

Build with commit ee7a2a8

Name Build Details
🤖 Android build View build page
DetailsDistribution: INTERNAL
Build profile: preview
SDK version: 52.0.0
App version: 24.12.2
🍎 iOS build View build page
DetailsDistribution: INTERNAL
Build profile: preview
SDK version: 52.0.0
App version: 24.12.2
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\":\"b03b6c346123586ff52ef036b9135f6094cab3bf\",\"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\",\"dark\":{\"backgroundColor\":\"#25292E\",\"image\":\"./assets/splash_icon.png\"},\"image\":\"./assets/splash_icon.png\",\"imageWidth\":\"200\"}],[\"expo-video\"]],\"runtimeVersion\":\"21\",\"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.12.2\"}",
      "reasons": [
        "expoConfig"
      ],
      "hash": "08bbf2b51021520c387b9056db05f0e274ea147b"
    },
    "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\":\"7718d2b7a02321714f081b81f851ec6c3052ee4f\",\"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\",\"dark\":{\"backgroundColor\":\"#25292E\",\"image\":\"./assets/splash_icon.png\"},\"image\":\"./assets/splash_icon.png\",\"imageWidth\":\"200\"}],[\"expo-video\"]],\"runtimeVersion\":\"21\",\"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.12.2\"}",
      "reasons": [
        "expoConfig"
      ],
      "hash": "48a35c5443c017006fd557932da57ba2902f10dc"
    }
  }
]

Learn more about 𝝠 Expo Github Action

@vytick
Copy link
Contributor Author

vytick commented Dec 17, 2024

@STew790 Please, just try, that Solana send works as before. There is no big change, but better to test once more.

@vytick vytick merged commit e79fee1 into develop Dec 17, 2024
16 checks passed
@vytick vytick deleted the feat/native/solana-send-tweaking branch December 17, 2024 20:45
@bosomt
Copy link
Contributor

bosomt commented Dec 18, 2024

QA OK

SOL sent 0.004582741 SOL sent from Solana #1
SOL token sent 0.23541798 RENDER sent from Solana #1

Info:

  • Suite version: desktop 24.12.2 (63a31cc)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/24.12.2 Chrome/128.0.6613.186 Electron/32.2.6 Safari/537.36
  • OS: MacIntel
  • Screen: 1512x982
  • Device: Trezor T3T1 2.8.3 regular (revision 7f373ae71eca855dd41b4a0fdcc7cadaa13a8281)
  • Transport: BridgeTransport 3.0.0-bundled.24.12.2

@STew790
Copy link
Contributor

STew790 commented Jan 7, 2025

QA OK
Sent SOL without any issue.

Info

25.1.2 30b62f5

@STew790 STew790 added the QA OK Issue passed QA without any blocker label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Suite Lite issues and PRs QA OK Issue passed QA without any blocker
Projects
Status: ✅ Approved
Development

Successfully merging this pull request may close these issues.

5 participants