diff --git a/src_bagl/ui_flow_signMessage.c b/src_bagl/ui_flow_signMessage.c index e4b38fd..545c221 100644 --- a/src_bagl/ui_flow_signMessage.c +++ b/src_bagl/ui_flow_signMessage.c @@ -7,18 +7,13 @@ static uint8_t ui_pos; static void dummy_pre_cb(void) { if (ui_pos == UI_191_POS_REVIEW) { -#ifdef TARGET_NANOS - skip_rest_of_message(); -#else question_switcher(); -#endif } else { ux_flow_prev(); ui_pos = UI_191_POS_REVIEW; } } -#ifndef TARGET_NANOS static void dummy_post_cb(void) { if (ui_pos == UI_191_POS_QUESTION) { continue_displaying_message(); @@ -27,7 +22,6 @@ static void dummy_post_cb(void) { ui_191_switch_to_message_end(); } } -#endif // clang-format off UX_STEP_NOCB( @@ -52,14 +46,21 @@ UX_STEP_INIT( { dummy_pre_cb(); }); -#ifndef TARGET_NANOS UX_STEP_CB( ux_191_step_theres_more, +#ifdef TARGET_NANOS + nn, +#else nnn, +#endif skip_rest_of_message(), { +#ifndef TARGET_NANOS "Press right to", "continue message", +#else + "Press right to read", +#endif "Double-press to skip" }); UX_STEP_INIT( @@ -69,7 +70,6 @@ UX_STEP_INIT( { dummy_post_cb(); }); -#endif UX_STEP_CB( ux_191_step_sign, pbb, @@ -94,10 +94,8 @@ UX_FLOW(ux_191_flow, &ux_191_step_review, &ux_191_step_message, &ux_191_step_dummy_pre, -#ifndef TARGET_NANOS &ux_191_step_theres_more, &ux_191_step_dummy_post, -#endif &ux_191_step_sign, &ux_191_step_cancel); @@ -111,22 +109,18 @@ void ui_191_switch_to_message(void) { ui_pos = UI_191_POS_REVIEW; } -#ifndef TARGET_NANOS void ui_191_switch_to_message_end(void) { // Force it to a value that will make it automatically do a prev() ui_pos = UI_191_POS_QUESTION; ux_flow_init(0, ux_191_flow, &ux_191_step_dummy_pre); } -#endif void ui_191_switch_to_sign(void) { ux_flow_init(0, ux_191_flow, &ux_191_step_sign); ui_pos = UI_191_POS_END; } -#ifndef TARGET_NANOS void ui_191_switch_to_question(void) { ux_flow_init(0, ux_191_flow, &ux_191_step_theres_more); ui_pos = UI_191_POS_QUESTION; } -#endif diff --git a/src_features/signMessage/cmd_signMessage.c b/src_features/signMessage/cmd_signMessage.c index 4b4008f..1c764b1 100644 --- a/src_features/signMessage/cmd_signMessage.c +++ b/src_features/signMessage/cmd_signMessage.c @@ -183,12 +183,6 @@ static void feed_display(void) { } } -#ifdef TARGET_NANOS - if ((remaining_ui_buffer_length() == 0) && (unprocessed_length > 0)) { - sprintf(remaining_ui_buffer() - 3, "..."); - } -#endif - if ((remaining_ui_buffer_length() == 0) || (tmpCtx.messageSigningContext.remainingLength == 0)) { if (!states.ui_started) { @@ -254,7 +248,6 @@ bool handleSignPersonalMessage(uint8_t p1, return true; } -#ifndef TARGET_NANOS /** * Decide whether to show the question to show more of the message or not */ @@ -267,7 +260,6 @@ void question_switcher(void) { ui_191_switch_to_sign(); } } -#endif /** * The user has decided to skip the rest of the message @@ -281,7 +273,6 @@ void skip_rest_of_message(void) { } } -#ifndef TARGET_NANOS /** * The user has decided to see the next chunk of the message */ @@ -291,4 +282,3 @@ void continue_displaying_message(void) { feed_display(); } } -#endif diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00005.png b/tests/zemu/snapshots/nanos_eip191_opensea/00005.png index 1a86e37..b1bddfe 100644 Binary files a/tests/zemu/snapshots/nanos_eip191_opensea/00005.png and b/tests/zemu/snapshots/nanos_eip191_opensea/00005.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00006.png b/tests/zemu/snapshots/nanos_eip191_opensea/00006.png index f5c2d67..f872acc 100644 Binary files a/tests/zemu/snapshots/nanos_eip191_opensea/00006.png and b/tests/zemu/snapshots/nanos_eip191_opensea/00006.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00007.png b/tests/zemu/snapshots/nanos_eip191_opensea/00007.png index d55782f..56b7f7b 100644 Binary files a/tests/zemu/snapshots/nanos_eip191_opensea/00007.png and b/tests/zemu/snapshots/nanos_eip191_opensea/00007.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00008.png b/tests/zemu/snapshots/nanos_eip191_opensea/00008.png index f5c2d67..d5c4fde 100644 Binary files a/tests/zemu/snapshots/nanos_eip191_opensea/00008.png and b/tests/zemu/snapshots/nanos_eip191_opensea/00008.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00009.png b/tests/zemu/snapshots/nanos_eip191_opensea/00009.png index ce795f3..407da90 100644 Binary files a/tests/zemu/snapshots/nanos_eip191_opensea/00009.png and b/tests/zemu/snapshots/nanos_eip191_opensea/00009.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00010.png b/tests/zemu/snapshots/nanos_eip191_opensea/00010.png new file mode 100644 index 0000000..481c8dc Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00010.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00011.png b/tests/zemu/snapshots/nanos_eip191_opensea/00011.png new file mode 100644 index 0000000..ff9dba9 Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00011.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00012.png b/tests/zemu/snapshots/nanos_eip191_opensea/00012.png new file mode 100644 index 0000000..e179c29 Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00012.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00013.png b/tests/zemu/snapshots/nanos_eip191_opensea/00013.png new file mode 100644 index 0000000..f872acc Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00013.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00014.png b/tests/zemu/snapshots/nanos_eip191_opensea/00014.png new file mode 100644 index 0000000..f5c2d67 Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00014.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00015.png b/tests/zemu/snapshots/nanos_eip191_opensea/00015.png new file mode 100644 index 0000000..d55782f Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00015.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00016.png b/tests/zemu/snapshots/nanos_eip191_opensea/00016.png new file mode 100644 index 0000000..f5c2d67 Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00016.png differ diff --git a/tests/zemu/snapshots/nanos_eip191_opensea/00017.png b/tests/zemu/snapshots/nanos_eip191_opensea/00017.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/zemu/snapshots/nanos_eip191_opensea/00017.png differ diff --git a/tests/zemu/src/eip191.test.js b/tests/zemu/src/eip191.test.js index c7f25bd..c54b013 100644 --- a/tests/zemu/src/eip191.test.js +++ b/tests/zemu/src/eip191.test.js @@ -56,7 +56,7 @@ nano_models.forEach(function(model) { if (model.letter == 'S') { - await sim.navigateAndCompareSnapshots('.', model.name + '_eip191_opensea', [1, 5, 1, -1, 0]); + await sim.navigateAndCompareSnapshots('.', model.name + '_eip191_opensea', [1, 5, 1, 6, 0, 1, -1, 0]); } else {