What changed, and why it matters
This commit adds a new user-interface option for Solana transactions on newer Trezor models (Delizia and Eckhart). When a transaction contains unknown instructions and must be 'blind signed,' the device now offers a menu item that lets the user skip reviewing the lengthy details and go straight to signing. The change is presented as a usability fix to avoid host-side timeouts during long reviews, not as a security fix. Older layouts (Bolt, Caesar) keep the previous behavior and do not offer the skip.
Treat this as a UX/feature change rather than a security fix. Review whether the new skip path weakens the intended security model for blind signing on Delizia/Eckhart, and ensure the 'Skip details' menu item cannot be triggered by automated host flows without explicit user action. Consider updating documentation and security model descriptions to reflect that unknown-instruction Solana transactions may now be signed without detail review on these models.
Security signals we found
Blind signing path is intentionally preserved; user is still required to confirm on-device
New 'skip details' option reduces information shown to user before signing for unknown-instruction transactions
Hold-to-sign and explicit 'Blind signing' title remain on the final signing screen
No change to transaction parsing, signature algorithm, or authorization checks
Usability-motivated change to avoid host timeouts, not a vulnerability patch
Evidence from the diff
The patch introduces confirm_solana_blind_signing() in four UI layout backends. On Bolt/Caesar it simply shows the existing warning and returns False, preserving the old flow. On Delizia/Eckhart it displays a warning screen with an external menu containing ‘Skip details’ and ‘Cancel’. If the user selects ‘Skip details,’ a second ‘Blind signing’ hold-to-sign screen is shown, also with a menu option to return to the details. In apps/solana/sign_tx.py, the function’s return value (skip_review) gates the existing multiple-signers confirmation and the predefined/unknown-instruction review. The test demonstrates both paths: signing without review and returning to review from the blind-signing screen.
Changed components
core/src/apps/solana/sign_tx.pycore/src/trezor/ui/layouts/delizia/__init__.pycore/src/trezor/ui/layouts/eckhart/__init__.pycore/src/trezor/ui/layouts/bolt/__init__.pycore/src/trezor/ui/layouts/caesar/__init__.pycore/translations/en.jsoncore/embed/rust/src/translations/generated/translated_string.rstests/device_tests/solana/test_sign_tx.pyInspect captured patch +443 / −8
### core/.changelog.d/7918.added
@@ -0,0 +1 @@
+[T3T1,T3W1] Solana: Allow skipping the review of transactions with unknown instructions to avoid host timeouts.
### core/embed/rust/librust_qstr.h
@@ -1476,6 +1476,7 @@ static void _librust_qstrs(void) {
MP_QSTR_solana__claim_question;
MP_QSTR_solana__claim_recipient_warning;
MP_QSTR_solana__confirm_multisig;
+ MP_QSTR_solana__details_not_reviewed;
MP_QSTR_solana__expected_fee;
MP_QSTR_solana__instruction_accounts_template;
MP_QSTR_solana__instruction_data;
@@ -1486,18 +1487,22 @@ static void _librust_qstrs(void) {
MP_QSTR_solana__multiple_signers;
MP_QSTR_solana__offchain_is_multisig;
MP_QSTR_solana__priority_fee;
+ MP_QSTR_solana__skip_details;
+ MP_QSTR_solana__skip_details_hint;
MP_QSTR_solana__stake;
MP_QSTR_solana__stake_account;
MP_QSTR_solana__stake_on_question;
MP_QSTR_solana__stake_question;
MP_QSTR_solana__stake_withdrawal_warning;
MP_QSTR_solana__stake_withdrawal_warning_title;
+ MP_QSTR_solana__title_blind_signing;
MP_QSTR_solana__transaction_contains_unknown_instructions;
MP_QSTR_solana__transaction_requires_x_signers_template;
MP_QSTR_solana__unknown_token;
MP_QSTR_solana__unknown_token_address;
MP_QSTR_solana__unstake;
MP_QSTR_solana__unstake_question;
+ MP_QSTR_solana__view_details_in_menu;
MP_QSTR_solana__vote_account;
MP_QSTR_stellar__account_merge;
MP_QSTR_stellar__account_thresholds;
### core/embed/rust/src/translations/generated/translated_string.rs
@@ -1691,6 +1691,16 @@ pub enum TranslatedString {
tutorial__title_middle_button = 1309, // {"Bolt": "", "Caesar": "Middle button", "Delizia": "", "Eckhart": ""}
tutorial__title_remember = 1310, // {"Bolt": "", "Caesar": "Remember", "Delizia": "", "Eckhart": ""}
tutorial__title_welcome = 1311, // {"Bolt": "", "Caesar": "Welcome to Trezor", "Delizia": "", "Eckhart": ""}
+ #[cfg(feature = "universal_fw")]
+ solana__details_not_reviewed = 1312, // "You are about to sign without reviewing the transaction details."
+ #[cfg(feature = "universal_fw")]
+ solana__skip_details = 1313, // "Skip details"
+ #[cfg(feature = "universal_fw")]
+ solana__skip_details_hint = 1314, // "If you are experiencing timeouts, skip straight to signing in the menu."
+ #[cfg(feature = "universal_fw")]
+ solana__title_blind_signing = 1315, // "Blind signing"
+ #[cfg(feature = "universal_fw")]
+ solana__view_details_in_menu = 1316, // "View details in the menu."
}
impl TranslatedString {
@@ -3010,6 +3020,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -4327,6 +4342,11 @@ impl TranslatedString {
19030,
19030,
19030,
+ 19094,
+ 19106,
+ 19177,
+ 19190,
+ 19215,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -5643,6 +5663,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -6960,6 +6985,11 @@ impl TranslatedString {
19030,
19030,
19030,
+ 19094,
+ 19106,
+ 19177,
+ 19190,
+ 19215,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -8276,6 +8306,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -9593,6 +9628,11 @@ impl TranslatedString {
19030,
19030,
19030,
+ 19094,
+ 19106,
+ 19177,
+ 19190,
+ 19215,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -10909,6 +10949,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -12226,6 +12271,11 @@ impl TranslatedString {
19030,
19030,
19030,
+ 19094,
+ 19106,
+ 19177,
+ 19190,
+ 19215,
];
} else if #[cfg(feature = "layout_caesar")] {
@@ -13543,6 +13593,11 @@ impl TranslatedString {
"Middle button",
"Remember",
"Welcome to Trezor",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -14860,6 +14915,11 @@ impl TranslatedString {
17158,
17166,
17183,
+ 17247,
+ 17259,
+ 17330,
+ 17343,
+ 17368,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -16176,6 +16236,11 @@ impl TranslatedString {
"Middle button",
"Remember",
"Welcome to Trezor",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -17493,6 +17558,11 @@ impl TranslatedString {
17158,
17166,
17183,
+ 17247,
+ 17259,
+ 17330,
+ 17343,
+ 17368,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -18809,6 +18879,11 @@ impl TranslatedString {
"Middle button",
"Remember",
"Welcome to Trezor",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -20126,6 +20201,11 @@ impl TranslatedString {
17158,
17166,
17183,
+ 17247,
+ 17259,
+ 17330,
+ 17343,
+ 17368,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -21442,6 +21522,11 @@ impl TranslatedString {
"Middle button",
"Remember",
"Welcome to Trezor",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -22759,6 +22844,11 @@ impl TranslatedString {
17158,
17166,
17183,
+ 17247,
+ 17259,
+ 17330,
+ 17343,
+ 17368,
];
} else if #[cfg(feature = "layout_delizia")] {
@@ -24076,6 +24166,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -25393,6 +25488,11 @@ impl TranslatedString {
19317,
19317,
19317,
+ 19381,
+ 19393,
+ 19464,
+ 19477,
+ 19502,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -26709,6 +26809,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -28026,6 +28131,11 @@ impl TranslatedString {
19317,
19317,
19317,
+ 19381,
+ 19393,
+ 19464,
+ 19477,
+ 19502,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -29342,6 +29452,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -30659,6 +30774,11 @@ impl TranslatedString {
19317,
19317,
19317,
+ 19381,
+ 19393,
+ 19464,
+ 19477,
+ 19502,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -31975,6 +32095,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -33292,6 +33417,11 @@ impl TranslatedString {
19317,
19317,
19317,
+ 19381,
+ 19393,
+ 19464,
+ 19477,
+ 19502,
];
} else if #[cfg(feature = "layout_eckhart")] {
@@ -34609,6 +34739,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", feature = "universal_fw"))]
@@ -35926,6 +36061,11 @@ impl TranslatedString {
20338,
20338,
20338,
+ 20402,
+ 20414,
+ 20485,
+ 20498,
+ 20523,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -37242,6 +37382,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -38559,6 +38704,11 @@ impl TranslatedString {
20338,
20338,
20338,
+ 20402,
+ 20414,
+ 20485,
+ 20498,
+ 20523,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -39875,6 +40025,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -41192,6 +41347,11 @@ impl TranslatedString {
20338,
20338,
20338,
+ 20402,
+ 20414,
+ 20485,
+ 20498,
+ 20523,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -42508,6 +42668,11 @@ impl TranslatedString {
"",
"",
"",
+ "You are about to sign without reviewing the transaction details.",
+ "Skip details",
+ "If you are experiencing timeouts, skip straight to signing in the menu.",
+ "Blind signing",
+ "View details in the menu.",
);
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -43825,6 +43990,11 @@ impl TranslatedString {
20338,
20338,
20338,
+ 20402,
+ 20414,
+ 20485,
+ 20498,
+ 20523,
];
}
@@ -45082,6 +45252,8 @@ impl TranslatedString {
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__confirm_multisig, Self::solana__confirm_multisig),
#[cfg(feature = "universal_fw")]
+ (Qstr::MP_QSTR_solana__details_not_reviewed, Self::solana__details_not_reviewed),
+ #[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__expected_fee, Self::solana__expected_fee),
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__instruction_accounts_template, Self::solana__instruction_accounts_template),
@@ -45102,6 +45274,10 @@ impl TranslatedString {
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__priority_fee, Self::solana__priority_fee),
#[cfg(feature = "universal_fw")]
+ (Qstr::MP_QSTR_solana__skip_details, Self::solana__skip_details),
+ #[cfg(feature = "universal_fw")]
+ (Qstr::MP_QSTR_solana__skip_details_hint, Self::solana__skip_details_hint),
+ #[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__stake, Self::solana__stake),
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__stake_account, Self::solana__stake_account),
@@ -45114,6 +45290,8 @@ impl TranslatedString {
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__stake_withdrawal_warning_title, Self::solana__stake_withdrawal_warning_title),
#[cfg(feature = "universal_fw")]
+ (Qstr::MP_QSTR_solana__title_blind_signing, Self::solana__title_blind_signing),
+ #[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__transaction_contains_unknown_instructions, Self::solana__transaction_contains_unknown_instructions),
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__transaction_requires_x_signers_template, Self::solana__transaction_requires_x_signers_template),
@@ -45126,6 +45304,8 @@ impl TranslatedString {
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__unstake_question, Self::solana__unstake_question),
#[cfg(feature = "universal_fw")]
+ (Qstr::MP_QSTR_solana__view_details_in_menu, Self::solana__view_details_in_menu),
+ #[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_solana__vote_account, Self::solana__vote_account),
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_stellar__account_merge, Self::stellar__account_merge),
### core/mocks/trezortranslate_keys.pyi
@@ -898,6 +898,7 @@ class TR:
solana__claim_question: str = "Claim SOL from stake account?"
solana__claim_recipient_warning: str = "Claiming SOL to address outside your current wallet."
solana__confirm_multisig: str = "Confirm multisig"
+ solana__details_not_reviewed: str = "You are about to sign without reviewing the transaction details."
solana__expected_fee: str = "Expected fee"
solana__instruction_accounts_template: str = "Instruction contains {0} accounts and its data is {1} bytes long."
solana__instruction_data: str = "Instruction data"
@@ -908,18 +909,22 @@ class TR:
solana__multiple_signers: str = "Multiple signers"
solana__offchain_is_multisig: str = "The following message requires multiple signers."
solana__priority_fee: str = "Priority fee"
+ solana__skip_details: str = "Skip details"
+ solana__skip_details_hint: str = "If you are experiencing timeouts, skip straight to signing in the menu."
solana__stake: str = "Stake"
solana__stake_account: str = "Stake account"
solana__stake_on_question: str = "Stake SOL on {0}?"
solana__stake_question: str = "Stake SOL?"
solana__stake_withdrawal_warning: str = "The current wallet isn't the SOL staking withdraw authority."
solana__stake_withdrawal_warning_title: str = "Withdraw authority address"
+ solana__title_blind_signing: str = "Blind signing"
solana__transaction_contains_unknown_instructions: str = "Transaction contains unknown instructions."
solana__transaction_requires_x_signers_template: str = "Transaction requires {0} signers which increases the fee."
solana__unknown_token: str = "Unknown token"
solana__unknown_token_address: str = "Unknown token address"
solana__unstake: str = "Unstake"
solana__unstake_question: str = "Unstake SOL from stake account?"
+ solana__view_details_in_menu: str = "View details in the menu."
solana__vote_account: str = "Vote account"
stellar__account_merge: str = "Account Merge"
stellar__account_thresholds: str = "Account Thresholds"
### core/src/apps/solana/sign_tx.py
@@ -26,7 +26,11 @@ async def sign_tx(
from trezor.crypto.curve import ed25519
from trezor.enums import ButtonRequestType
from trezor.messages import SolanaTxSignature
- from trezor.ui.layouts import confirm_metadata, show_continue_in_app, show_warning
+ from trezor.ui.layouts import (
+ confirm_metadata,
+ confirm_solana_blind_signing,
+ show_continue_in_app,
+ )
from apps.common import seed
@@ -48,13 +52,12 @@ async def sign_tx(
except Exception:
raise DataError("Invalid transaction")
+ skip_review = False
if transaction.blind_signing:
- await show_warning(
- "warning_blind_signing",
- TR.solana__transaction_contains_unknown_instructions,
- )
+ # reviewing a lengthy transaction may run into timeouts on the host
+ skip_review = await confirm_solana_blind_signing()
- if transaction.required_signers_count > 1:
+ if not skip_review and transaction.required_signers_count > 1:
await confirm_metadata(
"multiple_signers",
TR.solana__multiple_signers,
@@ -106,7 +109,7 @@ async def sign_tx(
verifier.verify()
- if not await try_confirm_predefined_transaction(
+ if not skip_review and not await try_confirm_predefined_transaction(
transaction,
fee,
address_n,
### core/src/trezor/ui/layouts/bolt/__init__.py
@@ -1644,6 +1644,14 @@ def confirm_solana_unknown_token_warning() -> Awaitable[None]:
"unknown_token_warning", content=TR.solana__unknown_token_address
)
+ async def confirm_solana_blind_signing() -> bool:
+ """Skipping the review is not offered on this layout."""
+ await show_warning(
+ "warning_blind_signing",
+ TR.solana__transaction_contains_unknown_instructions,
+ )
+ return False
+
def confirm_solana_recipient(
recipient: str,
title: str,
### core/src/trezor/ui/layouts/caesar/__init__.py
@@ -1660,6 +1660,14 @@ def confirm_solana_unknown_token_warning() -> Awaitable[None]:
title=TR.solana__unknown_token_address,
)
+ async def confirm_solana_blind_signing() -> bool:
+ """Skipping the review is not offered on this layout."""
+ await show_warning(
+ "warning_blind_signing",
+ TR.solana__transaction_contains_unknown_instructions,
+ )
+ return False
+
def confirm_solana_recipient(
recipient: str,
title: str,
### core/src/trezor/ui/layouts/delizia/__init__.py
@@ -1722,6 +1722,77 @@ def confirm_solana_unknown_token_warning() -> Awaitable[None]:
verb_cancel=TR.buttons__cancel_sign,
)
+ async def confirm_solana_blind_signing() -> bool:
+ """Warn about blind signing.
+
+ Return True if the user chooses to sign without reviewing the details,
+ False to review them. Raises ActionCancelled if the user cancels.
+ """
+ from trezor.ui.layouts.menu import (
+ Menu,
+ MenuLeaf,
+ MenuResult,
+ cancel_leaf,
+ interact_with_menu,
+ )
+
+ async def chosen() -> bool:
+ return True # any value leaves the menu
+
+ with trezorui_api.confirm_action(
+ title=TR.solana__title_blind_signing,
+ action=TR.solana__transaction_contains_unknown_instructions,
+ description=TR.solana__skip_details_hint,
+ verb=TR.buttons__continue,
+ danger=True,
+ external_menu=True,
+ ) as layout:
+ result = await interact_with_menu(
+ layout,
+ Menu(
+ [
+ MenuLeaf(
+ TR.solana__skip_details,
+ chosen,
+ intent=trezorui_api.MenuItemIntent.DANGER,
+ ),
+ cancel_leaf(TR.buttons__cancel),
+ ]
+ ),
+ "warning_blind_signing",
+ ButtonRequestType.Warning,
+ )
+ if result is CONFIRMED:
+ return False # review the details
+ if not isinstance(result, MenuResult):
+ raise RuntimeError # unexpected result
+
+ with trezorui_api.confirm_action(
+ title=TR.solana__title_blind_signing,
+ action=None,
+ description=None,
+ verb=TR.instructions__hold_to_sign,
+ hold=True,
+ danger=True,
+ external_menu=True,
+ ) as layout:
+ result = await interact_with_menu(
+ layout,
+ Menu(
+ [
+ MenuLeaf(TR.buttons__show_details, chosen),
+ cancel_leaf(TR.buttons__cancel),
+ ]
+ ),
+ "confirm_blind_signing",
+ ButtonRequestType.SignTx,
+ )
+ if result is CONFIRMED:
+ return True # sign without the review
+ if not isinstance(result, MenuResult):
+ raise RuntimeError # unexpected result
+ return False # back to the details
+
def confirm_solana_recipient(
recipient: str,
title: str,
### core/src/trezor/ui/layouts/eckhart/__init__.py
@@ -1079,6 +1079,79 @@ def confirm_solana_unknown_token_warning() -> Awaitable[None]:
verb_cancel=TR.buttons__cancel_sign,
)
+ async def confirm_solana_blind_signing() -> bool:
+ """Warn about blind signing.
+
+ Return True if the user chooses to sign without reviewing the details,
+ False to review them. Raises ActionCancelled if the user cancels.
+ """
+ from trezor.ui.layouts.menu import (
+ Menu,
+ MenuLeaf,
+ MenuResult,
+ cancel_leaf,
+ interact_with_menu,
+ )
+
+ async def chosen() -> bool:
+ return True # any value leaves the menu
+
+ with trezorui_api.confirm_action(
+ title=TR.solana__title_blind_signing,
+ action=TR.solana__transaction_contains_unknown_instructions,
+ description=None,
+ subtitle=TR.solana__skip_details_hint,
+ verb=TR.buttons__continue,
+ danger=True,
+ external_menu=True,
+ ) as layout:
+ result = await interact_with_menu(
+ layout,
+ Menu(
+ [
+ MenuLeaf(
+ TR.solana__skip_details,
+ chosen,
+ intent=trezorui_api.MenuItemIntent.DANGER,
+ ),
+ cancel_leaf(TR.buttons__cancel),
+ ]
+ ),
+ "warning_blind_signing",
+ ButtonRequestType.Warning,
+ )
+ if result is CONFIRMED:
+ return False # review the details
+ if not isinstance(result, MenuResult):
+ raise RuntimeError # unexpected result
+
+ with trezorui_api.confirm_action(
+ title=TR.solana__title_blind_signing,
+ action=TR.solana__details_not_reviewed,
+ description=None,
+ subtitle=TR.solana__view_details_in_menu,
+ verb=TR.instructions__hold_to_sign,
+ hold=True,
+ danger=True,
+ external_menu=True,
+ ) as layout:
+ result = await interact_with_menu(
+ layout,
+ Menu(
+ [
+ MenuLeaf(TR.buttons__show_details, chosen),
+ cancel_leaf(TR.buttons__cancel),
+ ]
+ ),
+ "confirm_blind_signing",
+ ButtonRequestType.SignTx,
+ )
+ if result is CONFIRMED:
+ return True # sign without the review
+ if not isinstance(result, MenuResult):
+ raise RuntimeError # unexpected result
+ return False # back to the details
+
async def confirm_ethereum_tx(
recipient: str | None,
total_amount: str,
### core/translations/en.json
@@ -2835,6 +2835,7 @@
"solana__claim_question": "Claim SOL from stake account?",
"solana__claim_recipient_warning": "Claiming SOL to address outside your current wallet.",
"solana__confirm_multisig": "Confirm multisig",
+ "solana__details_not_reviewed": "You are about to sign without reviewing the transaction details.",
"solana__expected_fee": "Expected fee",
"solana__instruction_accounts_template": "Instruction contains {0} accounts and its data is {1} bytes long.",
"solana__instruction_data": "Instruction data",
@@ -2845,12 +2846,15 @@
"solana__multiple_signers": "Multiple signers",
"solana__offchain_is_multisig": "The following message requires multiple signers.",
"solana__priority_fee": "Priority fee",
+ "solana__skip_details": "Skip details",
+ "solana__skip_details_hint": "If you are experiencing timeouts, skip straight to signing in the menu.",
"solana__stake": "Stake",
"solana__stake_account": "Stake account",
"solana__stake_on_question": "Stake SOL on {0}?",
"solana__stake_question": "Stake SOL?",
"solana__stake_withdrawal_warning": "The current wallet isn't the SOL staking withdraw authority.",
"solana__stake_withdrawal_warning_title": "Withdraw authority address",
+ "solana__title_blind_signing": "Blind signing",
"solana__transaction_contains_unknown_instructions": "Transaction contains unknown instructions.",
"solana__transaction_requires_x_signers_template": "Transaction requires {0} signers which increases the fee.",
"solana__unknown_token": "Unknown token",
@@ -2862,6 +2866,7 @@
},
"solana__unstake": "Unstake",
"solana__unstake_question": "Unstake SOL from stake account?",
+ "solana__view_details_in_menu": "View details in the menu.",
"solana__vote_account": "Vote account",
"stellar__account_merge": "Account Merge",
"stellar__account_thresholds": "Account Thresholds",
### core/translations/order.json
@@ -1310,5 +1310,10 @@
"1308": "tutorial__title_go_back",
"1309": "tutorial__title_middle_button",
"1310": "tutorial__title_remember",
- "1311": "tutorial__title_welcome"
+ "1311": "tutorial__title_welcome",
+ "1312": "solana__details_not_reviewed",
+ "1313": "solana__skip_details",
+ "1314": "solana__skip_details_hint",
+ "1315": "solana__title_blind_signing",
+ "1316": "solana__view_details_in_menu"
}
### tests/device_tests/solana/test_sign_tx.py
@@ -18,8 +18,10 @@
from trezorlib import btc, messages, misc
from trezorlib.debuglink import DebugSession as Session
+from trezorlib.debuglink import LayoutContent, LayoutType
from trezorlib.exceptions import TrezorFailure
from trezorlib.solana import get_authenticated_address, sign_tx
+from trezorlib.testing import translations as TR
from trezorlib.tools import b58decode, parse_path
from ...common import parametrize_using_common_fixtures
@@ -154,6 +156,75 @@ def test_solana_sign_tx(session: Session, parameters, result):
assert False, "Invalid expected result"
+@pytest.mark.models("delizia", "eckhart")
+@pytest.mark.parametrize("show_details", (False, True))
+def test_solana_sign_tx_skip_details(session: Session, show_details: bool):
+ """Skip the review from the blind signing warning, optionally return to it."""
+ # an unknown instruction with two signers
+ serialized_tx = _serialize_tx(
+ {
+ "version": None,
+ "header": {"signers": 2, "readonly_signers": 0, "readonly_non_signers": 1},
+ "accounts": [
+ "14CCvQzQzHCVgZM3j9soPnXuJXh1RmCfwLVUcdfbZVBS",
+ "AeDJ1BqA7ruBbd6mEcS1QNxFbT8FQbiBVuN9NqK94Taq",
+ "AeDJ1BqA7ruBbd6mEcS1QNxFbT8FQbiBVuN9NqK94Taq",
+ ],
+ "blockhash": "2p4rYZAaFfV5Uk5ugdG5KPNty9Uda9B3b4gWB8qnNqak",
+ "instructions": [
+ {"program_index": 2, "accounts": [0, 1], "data": "04deadbeef"}
+ ],
+ "luts": [],
+ }
+ )
+ debug = session.debug
+ reviewed: list[LayoutContent] = []
+
+ def select_first_menu_item(expected: str) -> None:
+ debug.click(debug.screen_buttons.menu())
+ assert debug.button_actions.navigate_to_menu_item(0) == expected
+
+ def input_flow():
+ assert (yield).name == "warning_blind_signing" # blind signing warning
+ assert debug.read_layout().title() == TR.solana__title_blind_signing
+ select_first_menu_item(TR.solana__skip_details)
+
+ assert (yield).name == "confirm_blind_signing" # signing without review
+ if show_details:
+ select_first_menu_item(TR.buttons__show_details)
+ # the review continues as usual
+ yield from client.ui.default_input_flow(on_page=reviewed.append)
+ else:
+ if debug.layout_type is LayoutType.Eckhart:
+ hold_button = debug.screen_buttons.ok()
+ elif debug.layout_type is LayoutType.Delizia:
+ hold_button = debug.screen_buttons.tap_to_confirm()
+ else:
+ raise ValueError(f"Unsupported layout type: {debug.layout_type}")
+ debug.click(hold_button, hold_ms=2000)
+ # ending the input flow here makes any further screen fail the test
+ # ("input flow ended prematurely")
+
+ with session.test_ctx as client:
+ client.set_input_flow(input_flow)
+ signature = sign_tx(
+ session,
+ address_n=parse_path("m/44h/501h/0h/0h"),
+ serialized_tx=serialized_tx,
+ additional_info=None,
+ )
+
+ if show_details:
+ # the review starts with the first screen after the warning
+ assert reviewed[0].title() == TR.solana__multiple_signers
+
+ # same as the "Unknown instruction" fixture
+ assert signature == bytes.fromhex(
+ "90093762546ad274def9b20ca6c441564193f2c7213cac704aefc6b7d65ebb31"
+ "5415fa7528728279a6688e2c99aa572d5af17b21a15a1d06b94e03df4ce53205"
+ )
+
+
def _serialize_tx(tx_construct):
serialized_instructions = []
for instruction in tx_construct["instructions"]:Why this scored 41/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.