Skip to content

Commit

Permalink
Update info page (#293)
Browse files Browse the repository at this point in the history
* Add contact information in info

* Swith to large tx mode in BLINDSIGN ON mode if user does not press skip
  • Loading branch information
ajinkyaraj-23 authored Sep 26, 2024
1 parent 77583f7 commit ae51bfb
Show file tree
Hide file tree
Showing 27 changed files with 42 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/apdu_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions app/src/ui_home_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.", "[email protected]"};

enum {
EXPERT_MODE_TOKEN = FIRST_USER_TOKEN,
Expand Down
Binary file removed tests/integration/touch/snapshots/flex/info.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed tests/integration/touch/snapshots/stax/info.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 31 additions & 1 deletion tests/integration/touch/test_blindsign_different_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
7 changes: 6 additions & 1 deletion tests/integration/touch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit ae51bfb

Please sign in to comment.