fix(cardano): ask detail level for datum outputs
What changed, and why it matters
This update fixes a user-interface bug in Trezor's Cardano transaction signing. For simple-looking Cardano transactions, the device was skipping the 'show details' prompt. Because of that, the user never saw important output data—specifically inline datums and reference scripts—even though those data are part of what the device signs. A malicious or buggy wallet app could have hidden those details from the user while still getting the device to sign them. The fix makes the device ask whether to show details as soon as it encounters an output containing Plutus data, so the user can review and decide.
Treat as a security fix and include in release notes. Users should upgrade firmware so that Cardano simple-transaction prompts reveal outputs containing datum/reference-script data before signing. Wallet software does not need changes, but should expect the new prompt.
Security signals we found
UI bypass / hidden signed data in simple Cardano transactions
Inline datum, reference script, and datum_hash outputs not shown to user before signing
New user prompt introduced for outputs containing Plutus data
Security changelog entry present: core/.changelog.d/+cardano-datum-prompt.security
Test fixtures added for ordinary transactions with datum/reference script
Evidence from the diff
In the Cardano signing flow, ordinary/simple transactions deferred the ‘should_show_details’ decision, defaulting to False. _should_show_output in signer.py only displays a change output with Plutus data when should_show_details is True, so inline_datum/reference_script/datum_hash outputs were silently hidden. The patch adds a flag _details_level_asked in ordinary_signer.py and, when the first output carrying Plutus data is encountered, prompts the user with a new message ‘Output contains a datum or reference script.’ to choose the detail level. It also extracts _output_has_plutus_data into a helper in signer.py and adds test fixtures covering both short and long inline datum/reference-script cases.
Changed components
core/src/apps/cardano/sign_tx/ordinary_signer.pycore/src/apps/cardano/sign_tx/signer.pyCardano transaction signing UI flowTranslation strings for Cardano promptsInspect captured patch +367 / −207
### common/tests/fixtures/cardano/sign_tx.show_details.json
@@ -387,6 +387,110 @@
"cvote_registration_signature": "2671b8e668ffce235647ac89deda6cc222e7b31a3d44606c2723fcf711b29f9af1e30b0c6b4f87ba37ddf9f6adf0226c39c09e655255890644a3dc4e64c3a001"
}
}
+ },
+ {
+ "description": "Ordinary transaction with inline datum, reference script and external address",
+ "parameters": {
+ "protocol_magic": 764824073,
+ "network_id": 1,
+ "fee": 42,
+ "ttl": 10,
+ "validity_interval_start": null,
+ "certificates": [],
+ "withdrawals": [],
+ "auxiliary_data": null,
+ "inputs": [
+ {
+ "path": "m/1852'/1815'/0'/0/0",
+ "prev_hash": "3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b7",
+ "prev_index": 0
+ }
+ ],
+ "outputs": [
+ {
+ "address": "addr1w9rhu54nz94k9l5v6d9rzfs47h7dv7xffcwkekuxcx3evnqpvuxu0",
+ "amount": "1",
+ "format": 1,
+ "inline_datum": "b7",
+ "reference_script": "3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0"
+ }
+ ],
+ "mint": [],
+ "script_data_hash": null,
+ "collateral_inputs": [],
+ "required_signers": [],
+ "collateral_return": null,
+ "total_collateral": null,
+ "reference_inputs": [],
+ "signing_mode": "ORDINARY_TRANSACTION",
+ "additional_witness_requests": [],
+ "include_network_id": false,
+ "tag_cbor_sets": false
+ },
+ "result": {
+ "tx_hash": "719d33e1e2811f82046951dccee1a9af82d8fe1d8abc36d581a9eccc421c3204",
+ "witnesses": [
+ {
+ "type": 1,
+ "pub_key": "5d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c1",
+ "signature": "57831ef649d0fd3fcda9ec218d071889dfd9296643a908101ae4a8030d053df4141b201dea9866ff63533547274db060abe7513989ab1299852b94db6236b20e",
+ "chain_code": null
+ }
+ ]
+ }
+ },
+ {
+ "description": "Ordinary transaction with long inline datum, long reference script and change address",
+ "parameters": {
+ "protocol_magic": 764824073,
+ "network_id": 1,
+ "fee": 42,
+ "ttl": 10,
+ "validity_interval_start": null,
+ "certificates": [],
+ "withdrawals": [],
+ "auxiliary_data": null,
+ "inputs": [
+ {
+ "path": "m/1852'/1815'/0'/0/0",
+ "prev_hash": "3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b7",
+ "prev_index": 0
+ }
+ ],
+ "outputs": [
+ {
+ "addressType": 0,
+ "path": "m/1852'/1815'/0'/0/0",
+ "stakingPath": "m/1852'/1815'/0'/2/0",
+ "amount": "1",
+ "format": 1,
+ "inline_datum": "3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b7",
+ "reference_script": "3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b73b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b7b3"
+ }
+ ],
+ "mint": [],
+ "script_data_hash": null,
+ "collateral_inputs": [],
+ "required_signers": [],
+ "collateral_return": null,
+ "total_collateral": null,
+ "reference_inputs": [],
+ "signing_mode": "ORDINARY_TRANSACTION",
+ "additional_witness_requests": [],
+ "include_network_id": false,
+ "tag_cbor_sets": false
+ },
+ "result": {
+ "tx_hash": "821e8163c5cf225c09f338f385c81e4326610f830e2abb89f9961e20741e6b70",
+ "witnesses": [
+ {
+ "type": 1,
+ "pub_key": "5d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c1",
+ "signature": "563c135e4a7eddbdcdf2e34f4f18b6e6d813d150a81cdeed2290fdc4b4884e2af0a849d7191713f4a26b15ebe35cb362b6d289b4030f79128070d5a5733c8909",
+ "chain_code": null
+ }
+ ]
+ }
}
]
}
### core/.changelog.d/+cardano-datum-prompt.security
@@ -0,0 +1 @@
+Cardano: Ask for the level of details when an output of a simple transaction contains a datum or a reference script.
### core/embed/rust/librust_qstr.h
@@ -1187,6 +1187,7 @@ static void _librust_qstrs(void) {
MP_QSTR_cardano__no_output_tx;
MP_QSTR_cardano__nonce;
MP_QSTR_cardano__other;
+ MP_QSTR_cardano__output_contains_datum_or_ref_script;
MP_QSTR_cardano__path;
MP_QSTR_cardano__pledge;
MP_QSTR_cardano__pointer;
### core/embed/rust/src/translations/generated/translated_string.rs
@@ -1680,17 +1680,19 @@ pub enum TranslatedString {
stellar__wasm_hash = 1298, // "Wasm hash"
#[cfg(feature = "universal_fw")]
ethereum__vault_owner_address = 1299, // "Owner address"
- buttons__shift = 1300, // {"Bolt": "", "Caesar": "Shift", "Delizia": "", "Eckhart": ""}
- tutorial__complete = 1301, // {"Bolt": "", "Caesar": "Complete tutorial", "Delizia": "", "Eckhart": ""}
- tutorial__hold_left_press_right = 1302, // {"Bolt": "", "Caesar": "Hold LEFT, press RIGHT.", "Delizia": "", "Eckhart": ""}
- tutorial__menu_later = 1303, // {"Bolt": "", "Caesar": "The menu provides context information. We will cover this later.", "Delizia": "", "Eckhart": ""}
- tutorial__press_both = 1304, // {"Bolt": "", "Caesar": "Press BOTH buttons at once.", "Delizia": "", "Eckhart": ""}
- tutorial__press_left = 1305, // {"Bolt": "", "Caesar": "Press LEFT.", "Delizia": "", "Eckhart": ""}
- tutorial__scroll_up = 1306, // {"Bolt": "", "Caesar": "Hold LEFT and press RIGHT to scroll up.", "Delizia": "", "Eckhart": ""}
- tutorial__title_go_back = 1307, // {"Bolt": "", "Caesar": "Need to go back?", "Delizia": "", "Eckhart": ""}
- tutorial__title_middle_button = 1308, // {"Bolt": "", "Caesar": "Middle button", "Delizia": "", "Eckhart": ""}
- tutorial__title_remember = 1309, // {"Bolt": "", "Caesar": "Remember", "Delizia": "", "Eckhart": ""}
- tutorial__title_welcome = 1310, // {"Bolt": "", "Caesar": "Welcome to Trezor", "Delizia": "", "Eckhart": ""}
+ #[cfg(feature = "universal_fw")]
+ cardano__output_contains_datum_or_ref_script = 1300, // "Output contains a datum or reference script."
+ buttons__shift = 1301, // {"Bolt": "", "Caesar": "Shift", "Delizia": "", "Eckhart": ""}
+ tutorial__complete = 1302, // {"Bolt": "", "Caesar": "Complete tutorial", "Delizia": "", "Eckhart": ""}
+ tutorial__hold_left_press_right = 1303, // {"Bolt": "", "Caesar": "Hold LEFT, press RIGHT.", "Delizia": "", "Eckhart": ""}
+ tutorial__menu_later = 1304, // {"Bolt": "", "Caesar": "The menu provides context information. We will cover this later.", "Delizia": "", "Eckhart": ""}
+ tutorial__press_both = 1305, // {"Bolt": "", "Caesar": "Press BOTH buttons at once.", "Delizia": "", "Eckhart": ""}
+ tutorial__press_left = 1306, // {"Bolt": "", "Caesar": "Press LEFT.", "Delizia": "", "Eckhart": ""}
+ tutorial__scroll_up = 1307, // {"Bolt": "", "Caesar": "Hold LEFT and press RIGHT to scroll up.", "Delizia": "", "Eckhart": ""}
+ tutorial__title_go_back = 1308, // {"Bolt": "", "Caesar": "Need to go back?", "Delizia": "", "Eckhart": ""}
+ 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": ""}
}
impl TranslatedString {
@@ -2998,6 +3000,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -4314,17 +4317,18 @@ impl TranslatedString {
19016,
19025,
19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -5629,6 +5633,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -6945,17 +6950,18 @@ impl TranslatedString {
19016,
19025,
19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -8260,6 +8266,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -9576,17 +9583,18 @@ impl TranslatedString {
19016,
19025,
19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -10891,6 +10899,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -12207,17 +12216,18 @@ impl TranslatedString {
19016,
19025,
19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
- 19038,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
+ 19082,
];
} else if #[cfg(feature = "layout_caesar")] {
@@ -13523,6 +13533,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"Shift",
"Complete tutorial",
"Hold LEFT, press RIGHT.",
@@ -14839,17 +14850,18 @@ impl TranslatedString {
16929,
16938,
16951,
- 16956,
- 16973,
- 16996,
- 17060,
- 17087,
- 17098,
- 17137,
- 17153,
- 17166,
- 17174,
- 17191,
+ 16995,
+ 17000,
+ 17017,
+ 17040,
+ 17104,
+ 17131,
+ 17142,
+ 17181,
+ 17197,
+ 17210,
+ 17218,
+ 17235,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -16154,6 +16166,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"Shift",
"Complete tutorial",
"Hold LEFT, press RIGHT.",
@@ -17470,17 +17483,18 @@ impl TranslatedString {
16929,
16938,
16951,
- 16956,
- 16973,
- 16996,
- 17060,
- 17087,
- 17098,
- 17137,
- 17153,
- 17166,
- 17174,
- 17191,
+ 16995,
+ 17000,
+ 17017,
+ 17040,
+ 17104,
+ 17131,
+ 17142,
+ 17181,
+ 17197,
+ 17210,
+ 17218,
+ 17235,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -18785,6 +18799,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"Shift",
"Complete tutorial",
"Hold LEFT, press RIGHT.",
@@ -20101,17 +20116,18 @@ impl TranslatedString {
16929,
16938,
16951,
- 16956,
- 16973,
- 16996,
- 17060,
- 17087,
- 17098,
- 17137,
- 17153,
- 17166,
- 17174,
- 17191,
+ 16995,
+ 17000,
+ 17017,
+ 17040,
+ 17104,
+ 17131,
+ 17142,
+ 17181,
+ 17197,
+ 17210,
+ 17218,
+ 17235,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -21416,6 +21432,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"Shift",
"Complete tutorial",
"Hold LEFT, press RIGHT.",
@@ -22732,17 +22749,18 @@ impl TranslatedString {
16929,
16938,
16951,
- 16956,
- 16973,
- 16996,
- 17060,
- 17087,
- 17098,
- 17137,
- 17153,
- 17166,
- 17174,
- 17191,
+ 16995,
+ 17000,
+ 17017,
+ 17040,
+ 17104,
+ 17131,
+ 17142,
+ 17181,
+ 17197,
+ 17210,
+ 17218,
+ 17235,
];
} else if #[cfg(feature = "layout_delizia")] {
@@ -24048,6 +24066,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -25364,17 +25383,18 @@ impl TranslatedString {
18859,
18868,
18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -26679,6 +26699,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -27995,17 +28016,18 @@ impl TranslatedString {
18859,
18868,
18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -29310,6 +29332,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -30626,17 +30649,18 @@ impl TranslatedString {
18859,
18868,
18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -31941,6 +31965,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -33257,17 +33282,18 @@ impl TranslatedString {
18859,
18868,
18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
- 18881,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
+ 18925,
];
} else if #[cfg(feature = "layout_eckhart")] {
@@ -34573,6 +34599,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -35889,17 +35916,18 @@ impl TranslatedString {
20324,
20333,
20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
];
#[cfg(all(feature = "debug", not(feature = "universal_fw")))]
@@ -37204,6 +37232,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -38520,17 +38549,18 @@ impl TranslatedString {
20324,
20333,
20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
];
#[cfg(all(not(feature = "debug"), feature = "universal_fw"))]
@@ -39835,6 +39865,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -41151,17 +41182,18 @@ impl TranslatedString {
20324,
20333,
20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
];
#[cfg(all(not(feature = "debug"), not(feature = "universal_fw")))]
@@ -42466,6 +42498,7 @@ impl TranslatedString {
"Deploy contract",
"Wasm hash",
"Owner address",
+ "Output contains a datum or reference script.",
"",
"",
"",
@@ -43782,17 +43815,18 @@ impl TranslatedString {
20324,
20333,
20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
- 20346,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
+ 20390,
];
}
@@ -44077,6 +44111,8 @@ impl TranslatedString {
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_cardano__other, Self::cardano__other),
#[cfg(feature = "universal_fw")]
+ (Qstr::MP_QSTR_cardano__output_contains_datum_or_ref_script, Self::cardano__output_contains_datum_or_ref_script),
+ #[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_cardano__path, Self::cardano__path),
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_cardano__pledge, Self::cardano__pledge),
### core/mocks/trezortranslate_keys.pyi
@@ -217,6 +217,7 @@ class TR:
cardano__no_output_tx: str = "Transaction has no outputs, network cannot be verified."
cardano__nonce: str = "Nonce"
cardano__other: str = "Other"
+ cardano__output_contains_datum_or_ref_script: str = "Output contains a datum or reference script."
cardano__path: str = "path"
cardano__pledge: str = "Pledge"
cardano__pointer: str = "pointer"
### core/src/apps/cardano/sign_tx/ordinary_signer.py
@@ -31,6 +31,7 @@ def __init__(
) -> None:
super().__init__(msg, keychain, slip21_keychain)
self.suite_tx_type: SuiteTxType = self._suite_tx_type()
+ self._details_level_asked = False
def _validate_tx_init(self) -> None:
msg = self.msg # local_cache_attribute
@@ -82,12 +83,24 @@ async def _show_tx_init(self) -> None:
self.should_show_details = await layout.should_show_details(
self.signing_mode_title
)
+ self._details_level_asked = True
else:
+ # the choice is deferred until an output with plutus data is encountered
self.should_show_details = False
if not self._is_network_id_verifiable():
await layout.warn_tx_network_unverifiable()
+ async def _should_show_output(self, output: messages.CardanoTxOutput) -> bool:
+ if not self._details_level_asked and self._output_has_plutus_data(output):
+ # Plutus data are shown only with details, so the user must be able to choose.
+ self.should_show_details = await layout.should_show_details(
+ TR.cardano__output_contains_datum_or_ref_script
+ )
+ self._details_level_asked = True
+
+ return await super()._should_show_output(output)
+
async def _confirm_tx(self, tx_hash: bytes) -> None:
# super() omitted intentionally
msg = self.msg # local_cache_attribute
### core/src/apps/cardano/sign_tx/signer.py
@@ -470,12 +470,7 @@ async def _should_show_output(self, output: CardanoTxOutput) -> bool:
if self._is_simple_change_output(output):
# Show change output only if showing details and if it contains plutus data
- has_plutus_data = (
- output.datum_hash is not None
- or output.inline_datum_size > 0
- or output.reference_script_size > 0
- )
- return self.should_show_details and has_plutus_data
+ return self.should_show_details and self._output_has_plutus_data(output)
return True
@@ -491,6 +486,13 @@ def _is_simple_change_output(self, output: CardanoTxOutput) -> bool:
output.address_parameters
)
+ def _output_has_plutus_data(self, output: CardanoTxOutput) -> bool:
+ return (
+ output.datum_hash is not None
+ or output.inline_datum_size > 0
+ or output.reference_script_size > 0
+ )
+
async def _process_legacy_output(
self,
output_list: HashBuilderList,
### core/translations/en.json
@@ -534,6 +534,7 @@
"cardano__no_output_tx": "Transaction has no outputs, network cannot be verified.",
"cardano__nonce": "Nonce",
"cardano__other": "Other",
+ "cardano__output_contains_datum_or_ref_script": "Output contains a datum or reference script.",
"cardano__path": "path",
"cardano__pledge": "Pledge",
"cardano__pointer": "pointer",
### core/translations/order.json
@@ -1299,15 +1299,16 @@
"1297": "stellar__deploy_contract",
"1298": "stellar__wasm_hash",
"1299": "ethereum__vault_owner_address",
- "1300": "buttons__shift",
- "1301": "tutorial__complete",
- "1302": "tutorial__hold_left_press_right",
- "1303": "tutorial__menu_later",
- "1304": "tutorial__press_both",
- "1305": "tutorial__press_left",
- "1306": "tutorial__scroll_up",
- "1307": "tutorial__title_go_back",
- "1308": "tutorial__title_middle_button",
- "1309": "tutorial__title_remember",
- "1310": "tutorial__title_welcome"
+ "1300": "cardano__output_contains_datum_or_ref_script",
+ "1301": "buttons__shift",
+ "1302": "tutorial__complete",
+ "1303": "tutorial__hold_left_press_right",
+ "1304": "tutorial__menu_later",
+ "1305": "tutorial__press_both",
+ "1306": "tutorial__press_left",
+ "1307": "tutorial__scroll_up",
+ "1308": "tutorial__title_go_back",
+ "1309": "tutorial__title_middle_button",
+ "1310": "tutorial__title_remember",
+ "1311": "tutorial__title_welcome"
}
### core/translations/signatures.json
@@ -1,8 +1,8 @@
{
"current": {
- "merkle_root": "bc26a8ab600331177a7b4066dd82dbeeddde5fe64a867ca77106a07fbb026f12",
- "datetime": "2026-10-20T10:36:12.335870+00:00",
- "commit": "05ea6072349751ab99e1baf997801a8aa385a840"
+ "merkle_root": "e458061546ae95f915ce2fffb6e3d4eaf3d4a890e21092c7e26b06f346994767",
+ "datetime": "2026-10-21T14:32:01.776378+00:00",
+ "commit": "3fa793d28961edbea6616edabceb5e4053c735a4"
},
"history": [
{Why this scored 60/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.