-
-
Notifications
You must be signed in to change notification settings - Fork 683
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(core): add Solana staking confirmation dialog #4639
Conversation
|
b688b1e
to
e9b59ee
Compare
Translations for these screens: en-EN
|
e9b59ee
to
4a5d3f2
Compare
4a5d3f2
to
cddb367
Compare
cddb367
to
e940ed1
Compare
Thanks @Hannsek! I have two questions:
diff --git a/core/translations/en.json b/core/translations/en.json
index 809fbde03..7dfe70a1c 100644
--- a/core/translations/en.json
+++ b/core/translations/en.json
@@ -772,6 +772,11 @@
"sign_message__verify_address": "Verify address",
"solana__account_index": "Account index",
"solana__associated_token_account": "Associated token account",
+ "solana__base_fee": "Base fee",
+ "solana__cancel_and_exit": "Cancel & exit",
+ "solana__claim_question": "Claim SOL from stake account?",
+ "solana__claim": "Claim",
+ "solana__claim_recipient_warning": "Claiming SOL to address outside your current wallet.",
"solana__confirm_multisig": "Confirm multisig",
"solana__expected_fee": "Expected fee",
"solana__instruction_accounts_template": "Instruction contains {0} accounts and its data is {1} bytes long.",
@@ -780,9 +785,17 @@
"solana__is_provided_via_lookup_table_template": "{0} is provided via a lookup table.",
"solana__lookup_table_address": "Lookup table address",
"solana__multiple_signers": "Multiple signers",
+ "solana__priority_fee": "Priority fee",
+ "solana__stake_account": "Stake account",
+ "solana__stake_question": "Stake SOL on stake account?",
+ "solana__stake": "Stake",
+ "solana__stake_withdrawal_warning": "The current wallet isn't the SOL staking withdraw authority.",
"solana__token_address": "Token address",
"solana__transaction_contains_unknown_instructions": "Transaction contains unknown instructions.",
"solana__transaction_requires_x_signers_template": "Transaction requires {0} signers which increases the fee.",
+ "solana__unstake_question": "Unstake SOL from stake account?",
+ "solana__unstake": "Unstake",
+ "solana__vote_account": "Vote account",
"stellar__account_merge": "Account Merge",
"stellar__account_thresholds": "Account Thresholds",
"stellar__add_signer": "Add Signer",
|
Yes, all strings should be translated. We should already have the translations of those strings somewhere in the repo. |
"Confirm message without review" is not from Solana staking flow. This shouldn't be here, my fault. |
Thanks! |
e940ed1
to
ba0eb61
Compare
The following screencasts are generated using the following test commands (derived from #4646) using ba0eb61: STAKE=0100020a00d1699dcb1811b50bb0055f13044463128242e37a463b52f6c97a1f6eef88ad8c72b471e11674bdcd1e5f85421be42097d5d9c8642172ab73ccf6ff003a43f3c80f8b50107e9f3e3c16a661b8c806df454a6deb293d5e8730a9d28f2f4998c606a1d8179137542a983437bdfe2a7ab2557f535c8a78722b68a49dc00000000006a7d51718c774c928566398691d5eb68b5eb8a39b4b6d5c73555b21000000000306466fe5211732ffecadba72c39be7bc8ce5bbc5f7126b2c439b3a40000000000000000000000000000000000000000000000000000000000000000000000006a7d517192c5c51218cc94c3d4af17f58daee089ba1fd44e3dbd98a0000000006a7d517193584d0feed9bb3431d13206be544281b57b8566cc5375ff400000006a1d817a502050b680791e6ce6db88e1e5b7150f61fc6790a4eb4d1000000001aea57c9906a7cad656ff61b3893abda63f4b6b210c939855e7ab6e54049213d0405000903401f00000000000006020001620300000000d1699dcb1811b50bb0055f13044463128242e37a463b52f6c97a1f6eef88ad0600000000000000736565643a31002d3101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003020107740000000000d1699dcb1811b50bb0055f13044463128242e37a463b52f6c97a1f6eef88ad00d1699dcb1811b50bb0055f13044463128242e37a463b52f6c97a1f6eef88ad00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003060102040809000402000000
UNSTAKE=0100020500d1699dcb1811b50bb0055f13044463128242e37a463b52f6c97a1f6eef88ad8c72b471e11674bdcd1e5f85421be42097d5d9c8642172ab73ccf6ff003a43f306a1d8179137542a983437bdfe2a7ab2557f535c8a78722b68a49dc00000000006a7d51718c774c928566398691d5eb68b5eb8a39b4b6d5c73555b21000000000306466fe5211732ffecadba72c39be7bc8ce5bbc5f7126b2c439b3a400000001aea57c9906a7cad656ff61b3893abda63f4b6b210c939855e7ab6e54049213d0204000903401f00000000000002030103000405000000
CLAIM=0100030500d1699dcb1811b50bb0055f13044463128242e37a463b52f6c97a1f6eef88ad8c72b471e11674bdcd1e5f85421be42097d5d9c8642172ab73ccf6ff003a43f306a1d8179137542a983437bdfe2a7ab2557f535c8a78722b68a49dc00000000006a7d51718c774c928566398691d5eb68b5eb8a39b4b6d5c73555b21000000000306466fe5211732ffecadba72c39be7bc8ce5bbc5f7126b2c439b3a400000001aea57c9906a7cad656ff61b3893abda63f4b6b210c939855e7ab6e54049213d0204000903401f00000000000002060100030400000c0400000040420f0000000000
trezorctl device load -m 'all all all all all all all all all all all all'
trezorctl solana sign-tx -n 'm/44h/501h/0h/0h' $STAKE
trezorctl solana sign-tx -n 'm/44h/501h/0h/0h' $UNSTAKE
trezorctl solana sign-tx -n 'm/44h/501h/0h/0h' $CLAIM Screencast.from.2025-02-18.19-08-39.webmScreencast.from.2025-02-18.19-21-04.webmScreencast.from.2025-02-18.19-23-21.webm@Hannsek WDYT? |
e288975
to
c3821fc
Compare
4f84439
to
6d205a4
Compare
4f82374
to
846ccf1
Compare
Rebased and force-pushed to squash the fixup commits. |
I observed some some deviations from the Figma deign.
They do not break the functionality so it is not critical to fix them all. |
Move fee calculation into `Transaction` class. Also, replace floating-point division by integer division in fee calculation. [no changelog]
Otherwise, we may get an additional empty confirmation screen. [no changelog]
It will allow confirming the blockhash for Solana transactions. Also, simplify arguments passing into `new_confirm_output()`. [no changelog]
It will allow confirming the vote account for Solana staking. [no changelog]
[no changelog]
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.
LGTM code-wise
8b66545
to
2eb77a0
Compare
Squashed the fixup commits - and opened #4672 for fixing the issues in #4639 (comment). |
Resolves #4560.
Figma
TODOs