diff --git a/app/src/apdu_sign.c b/app/src/apdu_sign.c index 04d5e5e4..ef6761c7 100644 --- a/app/src/apdu_sign.c +++ b/app/src/apdu_sign.c @@ -273,7 +273,7 @@ refill_blo_im_full(void) #elif HAVE_NBGL PRINTF("[DEBUG] field=%s complex=%d\n", st->field_info.field_name, st->field_info.is_field_complex); - if ((N_settings.blindsign_status == ST_BLINDSIGN_LARGE_TX) + if ((N_settings.blindsign_status != ST_BLINDSIGN_OFF) && (SCREEN_DISPLAYED >= NB_MAX_SCREEN_ALLOWED)) { strncpy(global.error_code, "TOO_MANY_SCREENS", ERROR_CODE_SIZE); tz_ui_stream_push_all(TZ_UI_STREAM_CB_CANCEL, diff --git a/app/src/ui_home_nbgl.c b/app/src/ui_home_nbgl.c index 1c41ece2..78d7ef2c 100644 --- a/app/src/ui_home_nbgl.c +++ b/app/src/ui_home_nbgl.c @@ -36,12 +36,12 @@ void tz_ui_home_redisplay(uint8_t page); // ----------------------------------------------------------- // --------------------- SETTINGS MENU ----------------------- // ----------------------------------------------------------- -#define SETTING_INFO_NB 2 +#define SETTING_INFO_NB 3 #define SETTINGS_SWITCHES_NB 1 #define SETTINGS_RADIO_NB 3 -static const char *const infoTypes[] = {"Version", "Developer"}; -static const char *const infoContents[] - = {APPVERSION, "Trilitech Kanvas Limited et al."}; +static const char *const infoTypes[] = {"Version", "Developer", "Contact"}; +static const char *const infoContents[] = { + APPVERSION, "Trilitech Kanvas Limited et al.", "ledger-tezos@trili.tech"}; enum { EXPERT_MODE_TOKEN = FIRST_USER_TOKEN, diff --git a/tests/integration/touch/snapshots/flex/info.png b/tests/integration/touch/snapshots/flex/info.png deleted file mode 100755 index 2ee72f26..00000000 Binary files a/tests/integration/touch/snapshots/flex/info.png and /dev/null differ diff --git a/tests/integration/touch/snapshots/flex/info_flex_1.png b/tests/integration/touch/snapshots/flex/info_flex_1.png new file mode 100644 index 00000000..351b8845 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/info_flex_1.png differ diff --git a/tests/integration/touch/snapshots/flex/info_flex_2.png b/tests/integration/touch/snapshots/flex/info_flex_2.png new file mode 100644 index 00000000..81e695a9 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/info_flex_2.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/review_transaction.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/review_transaction.png new file mode 100644 index 00000000..00bec06d Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/review_transaction.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_1.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_1.png new file mode 100644 index 00000000..f010f761 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_1.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_2.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_2.png new file mode 100644 index 00000000..3c85f8da Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_2.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_3.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_3.png new file mode 100644 index 00000000..6687c592 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_3.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_4.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_4.png new file mode 100644 index 00000000..e3ed3ba7 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_1_4.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_1.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_1.png new file mode 100644 index 00000000..7f1c52c4 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_1.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_2.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_2.png new file mode 100644 index 00000000..d8a22ce0 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_2.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_3.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_3.png new file mode 100644 index 00000000..d8a22ce0 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_2_3.png differ diff --git a/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_3_1.png b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_3_1.png new file mode 100644 index 00000000..81274f18 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_blindsign_different_modes/tbdm_skip_screen_3_1.png differ diff --git a/tests/integration/touch/snapshots/stax/info.png b/tests/integration/touch/snapshots/stax/info.png deleted file mode 100755 index a0eae82e..00000000 Binary files a/tests/integration/touch/snapshots/stax/info.png and /dev/null differ diff --git a/tests/integration/touch/snapshots/stax/info_stax.png b/tests/integration/touch/snapshots/stax/info_stax.png new file mode 100644 index 00000000..aea0d3a3 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/info_stax.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/review_transaction.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/review_transaction.png new file mode 100644 index 00000000..68c268b9 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/review_transaction.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_1.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_1.png new file mode 100644 index 00000000..f5e29533 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_1.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_2.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_2.png new file mode 100644 index 00000000..4eb6920f Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_2.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_3.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_3.png new file mode 100644 index 00000000..f41ae61a Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_1_3.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_2_1.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_2_1.png new file mode 100644 index 00000000..336ab26b Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_2_1.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_2_2.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_2_2.png new file mode 100644 index 00000000..336ab26b Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_2_2.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_1.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_1.png new file mode 100644 index 00000000..aecc8103 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_1.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_2.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_2.png new file mode 100644 index 00000000..2963845b Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_2.png differ diff --git a/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_3.png b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_3.png new file mode 100644 index 00000000..7a5a8891 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_blindsign_different_modes/tbdm_skip_screen_3_3.png differ diff --git a/tests/integration/touch/test_blindsign_different_modes.py b/tests/integration/touch/test_blindsign_different_modes.py index 6b4e39ec..8bdd4cea 100755 --- a/tests/integration/touch/test_blindsign_different_modes.py +++ b/tests/integration/touch/test_blindsign_different_modes.py @@ -126,5 +126,35 @@ def blindsign_review_sign(app: TezosAppScreen): app.send_apdu("800f81ff48000000096d6573736167653137000000096d6573736167653138000000096d65737361676531397000ffdd6102321bc251e4a5190ad5b12b251069d9b4c0843d0f0103ff80ade204") blindsign_review_sign(app) - app.set_blindsigning_status(BlindsigningStatus.Large_Tx_only) +# # Blindsign status ON but continue clear signing + app.assert_home() + app.set_blindsigning_status(BlindsigningStatus.ON) + app.send_initialize_msg( "800f000011048000002c800006c18000000080000000") + send_payload(app, "800f01ffeb0300000000000000000000000000000000000000000000000000000000000000006b00ffdd6102321bc251e4a5190ad5b12b251069d9b4c0843d0b0104020320182716513907b6bab33f905396d031931c07e01bddd780780c1a56b9c086da6c00ffdd6102321bc251e4a5190ad5b12b251069d9b480897a0c0107c08db701000278eb8b6ab9a768579cd5146b480789650c83f28effff0d7570646174655f636f6e6669670000000607070005030a6e00ffdd6102321bc251e4a5190ad5b12b251069d9b4c08db7010d0105ff01ee572f02e5be5d097ba17369789582882e8abb87c900ffdd6102321bc2") + app.assert_screen("review_transaction") + app.review.next() + group_1_screen_count= app.firmware == Firmware.STAX and 3 or 4 + for i in range(group_1_screen_count): + app.assert_screen("tbdm_skip_screen_1_" + str(i+1)) + app.review.next() + app.assert_screen("expert_mode_splash") + group_2_screen_count= app.firmware == Firmware.STAX and 2 or 3 + for i in range(group_2_screen_count): + app.review.next() + app.assert_screen("tbdm_skip_screen_2_" + str(i+1)) + app.expect_apdu_return("9000") + app.send_apdu("800f01ffeb51e4a5190ad5b12b251069d9b48092f4010e0106000000fa000000086d65737361676530000000086d65737361676531000000086d65737361676532000000086d65737361676533000000086d65737361676534000000086d65737361676535000000086d65737361676536000000086d65737361676537000000086d65737361676538000000086d65737361676539000000096d6573736167653130000000096d6573736167653131000000096d6573736167653132000000096d6573736167653133000000096d6573736167653134000000096d6573736167653135000000096d6573736167653136") + group_3_screen_count= app.firmware == Firmware.STAX and 3 or 1 + for i in range(group_3_screen_count): + app.review.next() + app.assert_screen("tbdm_skip_screen_3_" + str(i+1)) + app.review.next() + app.assert_screen("blindsign_warning_too_many_screens") + app.review.back_to_safety.reject() + app.expect_apdu_return("9000") + app.send_apdu("800f81ff48000000096d6573736167653137000000096d6573736167653138000000096d65737361676531397000ffdd6102321bc251e4a5190ad5b12b251069d9b4c0843d0f0103ff80ade204") + blindsign_review_sign(app) + app.set_expert_mode(initial_status=True) + app.set_blindsigning_status(BlindsigningStatus.Large_Tx_only) + app.assert_home() diff --git a/tests/integration/touch/utils.py b/tests/integration/touch/utils.py index 50778edf..76eb0d08 100644 --- a/tests/integration/touch/utils.py +++ b/tests/integration/touch/utils.py @@ -291,7 +291,12 @@ def assert_home(self): self.assert_screen("home", True) def assert_info(self): - self.assert_screen("info", True) + if(Firmware.STAX == self.firmware): + self.assert_screen("info_stax", True) + else: + self.assert_screen("info_flex_1", True) + self.review.next() + self.assert_screen("info_flex_2", True) def assert_expert_mode(self, expert_mode=False): suffix = ""