@@ -112,6 +112,16 @@ UX_STEP_NOCB(ux_approval_review_step,
112
112
"Review" ,
113
113
"transaction" ,
114
114
});
115
+ UX_STEP_NOCB (ux_approval_tx_hash_step ,
116
+ bnnn_paging ,
117
+ {
118
+ #ifdef TARGET_NANOS
119
+ .title = "TX hash" ,
120
+ #else
121
+ .title = "Transaction hash" ,
122
+ #endif
123
+ .text = strings .common .fullAmount
124
+ });
115
125
UX_STEP_NOCB (
116
126
ux_approval_amount_step ,
117
127
bnnn_paging ,
@@ -237,11 +247,23 @@ void ux_approve_tx(bool fromPlugin) {
237
247
ux_approval_tx_flow [step ++ ] = & ux_plugin_approval_display_step ;
238
248
ux_approval_tx_flow [step ++ ] = & ux_plugin_approval_after_step ;
239
249
} else {
250
+ if (tmpContent .txContent .dataPresent ) {
251
+ #pragma GCC diagnostic ignored "-Wformat"
252
+ snprintf (strings .common .fullAmount ,
253
+ sizeof (strings .common .fullAmount ),
254
+ "0x%.*h" ,
255
+ sizeof (tmpCtx .transactionContext .hash ),
256
+ tmpCtx .transactionContext .hash );
257
+ #pragma GCC diagnostic warning "-Wformat"
258
+ ux_approval_tx_flow [step ++ ] = & ux_approval_tx_hash_step ;
259
+ }
240
260
// We're in a regular transaction, just show the amount and the address
241
261
if (strings .common .fromAddress [0 ] != 0 ) {
242
262
ux_approval_tx_flow [step ++ ] = & ux_approval_from_step ;
243
263
}
244
- ux_approval_tx_flow [step ++ ] = & ux_approval_amount_step ;
264
+ if (!tmpContent .txContent .dataPresent ) {
265
+ ux_approval_tx_flow [step ++ ] = & ux_approval_amount_step ;
266
+ }
245
267
#ifdef HAVE_TRUSTED_NAME
246
268
uint64_t chain_id = get_tx_chain_id ();
247
269
e_name_type type = TYPE_ACCOUNT ;
0 commit comments