diff --git a/Makefile b/Makefile index 57080871..74aaff23 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # **************************************************************************** # Ledger App Solana -# (c) 2020 Ledger SAS. +# (c) 2024 Ledger SAS. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,128 +28,77 @@ endif include $(BOLOS_SDK)/Makefile.defines -APP_LOAD_PARAMS = --curve ed25519 -ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) -APP_LOAD_PARAMS += --appFlags 0xa00 # APPLICATION_FLAG_LIBRARY + APPLICATION_FLAG_BOLOS_SETTINGS -else -APP_LOAD_PARAMS += --appFlags 0x800 # APPLICATION_FLAG_LIBRARY -endif -APP_LOAD_PARAMS += --path "44'/501'" -APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS) +######################################## +# Mandatory configuration # +######################################## +# Application name +APPNAME = "Solana" -APPNAME = "Solana" +# Application version APPVERSION_M = 1 -APPVERSION_N = 4 -APPVERSION_P = 3 -APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" - -ifeq ($(TARGET_NAME),TARGET_NANOS) - ICONNAME=icons/nanos_app_solana.gif -else ifeq ($(TARGET_NAME),TARGET_STAX) - ICONNAME=icons/stax_app_solana.gif -else - ICONNAME=icons/nanox_app_solana.gif -endif +APPVERSION_N = 5 +APPVERSION_P = 0 +APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" -################ -# Default rule # -################ -all: default - -DEFINES += $(DEFINES_LIB) -DEFINES += APPNAME=\"$(APPNAME)\" -DEFINES += APPVERSION=\"$(APPVERSION)\" -DEFINES += MAJOR_VERSION=$(APPVERSION_M) MINOR_VERSION=$(APPVERSION_N) PATCH_VERSION=$(APPVERSION_P) -DEFINES += OS_IO_SEPROXYHAL -DEFINES += HAVE_SPRINTF -DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=6 IO_HID_EP_LENGTH=64 HAVE_USB_APDU -DEFINES += USB_SEGMENT_SIZE=64 -DEFINES += BLE_SEGMENT_SIZE=32 -DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=0 WEBUSB_URL="" -DEFINES += UNUSED\(x\)=\(void\)x - -ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) - DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000 HAVE_BLE_APDU -endif +# Application source files +APP_SOURCE_PATH += src -ifeq ($(TARGET_NAME),TARGET_NANOS) - DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128 -else - DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300 -endif +# Application icons +ICON_NANOS = icons/nanos_app_solana.gif +ICON_NANOX = icons/nanox_app_solana.gif +ICON_NANOSP = icons/nanox_app_solana.gif +ICON_STAX = icons/stax_app_solana.gif +ICON_FLEX = icons/flex_app_solana.gif -ifeq ($(TARGET_NAME),TARGET_STAX) - DEFINES += NBGL_QRCODE - SDK_SOURCE_PATH += qrcode -else - DEFINES += HAVE_BAGL HAVE_UX_FLOW - ifneq ($(TARGET_NAME),TARGET_NANOS) - DEFINES += HAVE_GLO096 - DEFINES += BAGL_WIDTH=128 BAGL_HEIGHT=64 - DEFINES += HAVE_BAGL_ELLIPSIS - DEFINES += HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX - DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX - DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX - endif -endif +# Application allowed derivation curves +CURVE_APP_LOAD_PARAMS = ed25519 -DEBUG = 0 -ifneq ($(DEBUG),0) - DEFINES += HAVE_PRINTF - ifeq ($(TARGET_NAME),TARGET_NANOS) - DEFINES += PRINTF=screen_printf - else - DEFINES += PRINTF=mcu_usb_printf - endif -else - DEFINES += PRINTF\(...\)= -endif +# Application allowed derivation paths. +PATH_APP_LOAD_PARAMS = "44'/501'" # purpose=coin(44) / coin_type=Solana(501) -ifneq ($(BOLOS_ENV),) -$(info BOLOS_ENV=$(BOLOS_ENV)) -CLANGPATH := $(BOLOS_ENV)/clang-arm-fropi/bin/ -GCCPATH := $(BOLOS_ENV)/gcc-arm-none-eabi-5_3-2016q1/bin/ -else -$(info BOLOS_ENV is not set: falling back to CLANGPATH and GCCPATH) -endif -ifeq ($(CLANGPATH),) -$(info CLANGPATH is not set: clang will be used from PATH) -endif -ifeq ($(GCCPATH),) -$(info GCCPATH is not set: arm-none-eabi-* will be used from PATH) +# Setting to allow building variant applications +VARIANT_PARAM = COIN +VARIANT_VALUES = solana + +# Enabling DEBUG flag will enable PRINTF and disable optimizations +#DEBUG = 1 + +######################################## +# Application custom permissions # +######################################## +HAVE_APPLICATION_FLAG_LIBRARY = 1 +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX TARGET_FLEX)) +HAVE_APPLICATION_FLAG_BOLOS_SETTINGS = 1 endif -CC := $(CLANGPATH)clang -CFLAGS += -O3 -Os -AS := $(GCCPATH)arm-none-eabi-gcc -LD := $(GCCPATH)arm-none-eabi-gcc -LDFLAGS += -O3 -Os -LDLIBS += -lm -lgcc -lc +######################################## +# Application communication interfaces # +######################################## +ENABLE_BLUETOOTH = 1 -include $(BOLOS_SDK)/Makefile.glyphs +######################################## +# NBGL custom features # +######################################## +ENABLE_NBGL_QRCODE = 1 -APP_SOURCE_PATH += src -SDK_SOURCE_PATH += lib_stusb lib_stusb_impl +######################################## +# Features disablers # +######################################## +# These advanced settings allow to disable some feature that are by +# default enabled in the SDK `Makefile.standard_app`. +DISABLE_STANDARD_APP_FILES = 1 # Allow usage of function from lib_standard_app/crypto_helpers.c APP_SOURCE_FILES += ${BOLOS_SDK}/lib_standard_app/crypto_helpers.c -ifneq ($(TARGET_NAME),TARGET_STAX) -SDK_SOURCE_PATH += lib_ux -endif - -ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) - SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl -endif - -WITH_U2F=0 +WITH_U2F?=0 ifneq ($(WITH_U2F),0) DEFINES += HAVE_U2F HAVE_IO_U2F DEFINES += U2F_PROXY_MAGIC=\"~SOL\" SDK_SOURCE_PATH += lib_u2f endif -WITH_LIBSOL=1 +WITH_LIBSOL?=1 ifneq ($(WITH_LIBSOL),0) SOURCE_FILES += $(filter-out %_test.c,$(wildcard libsol/*.c)) CFLAGS += -Ilibsol/include @@ -157,19 +106,4 @@ ifneq ($(WITH_LIBSOL),0) DEFINES += NDEBUG endif -load: all load-only -load-only: - python3 -m ledgerblue.loadApp $(APP_LOAD_PARAMS) - -load-offline: all - python3 -m ledgerblue.loadApp $(APP_LOAD_PARAMS) --offline - -delete: - python3 -m ledgerblue.deleteApp $(COMMON_DELETE_PARAMS) - -include $(BOLOS_SDK)/Makefile.rules - -dep/%.d: %.c Makefile - -listvariants: - @echo VARIANTS COIN solana +include $(BOLOS_SDK)/Makefile.standard_app diff --git a/icons/flex_app_solana.gif b/icons/flex_app_solana.gif new file mode 100644 index 00000000..f8fc11d5 Binary files /dev/null and b/icons/flex_app_solana.gif differ diff --git a/ledger_app.toml b/ledger_app.toml index d19344d0..101e5b17 100644 --- a/ledger_app.toml +++ b/ledger_app.toml @@ -1,7 +1,7 @@ [app] build_directory = "./" sdk = "C" -devices = ["nanos", "nanox", "nanos+", "stax"] +devices = ["nanos", "nanox", "nanos+", "stax", "flex"] [tests] pytest_directory = "./tests/python" diff --git a/src/main.c b/src/main.c index ba88e23f..cdd3a13e 100644 --- a/src/main.c +++ b/src/main.c @@ -175,7 +175,7 @@ void nv_app_state_init() { if (N_storage.initialized != 0x01) { internalStorage_t storage; storage.settings.allow_blind_sign = BlindSignDisabled; -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) storage.settings.pubkey_display = PubkeyDisplayLong; #else storage.settings.pubkey_display = PubkeyDisplayShort; diff --git a/src/ui/get_pubkey_nbgl.c b/src/ui/get_pubkey_nbgl.c index 8c8f3490..4d077146 100644 --- a/src/ui/get_pubkey_nbgl.c +++ b/src/ui/get_pubkey_nbgl.c @@ -1,4 +1,3 @@ - /***************************************************************************** * Ledger App Solana * (c) 2023 Ledger SAS. @@ -25,37 +24,24 @@ #include "ui_api.h" #include "apdu.h" -static void confirm_address_approval(void) { - // display a success status page and go back to main - sendResponse(set_result_get_pubkey(), ApduReplySuccess, false); - nbgl_useCaseStatus("ADDRESS\nVERIFIED", true, ui_idle); -} - -static void confirm_address_rejection(void) { - // display a status page and go back to main - sendResponse(0, ApduReplyUserRefusal, false); - nbgl_useCaseStatus("Address verification\ncancelled", false, ui_idle); -} - static void review_choice(bool confirm) { + // Answer, display a status page and go back to main if (confirm) { - confirm_address_approval(); + sendResponse(set_result_get_pubkey(), ApduReplySuccess, false); + nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_VERIFIED, ui_idle); } else { - confirm_address_rejection(); + sendResponse(0, ApduReplyUserRefusal, false); + nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_REJECTED, ui_idle); } } -static void continue_review(void) { - nbgl_useCaseAddressConfirmation(G_publicKeyStr, review_choice); -} - void ui_get_public_key(void) { - nbgl_useCaseReviewStart(&C_icon_solana_64x64, - "Verify Solana\naddress", - NULL, - "Cancel", - continue_review, - confirm_address_rejection); + nbgl_useCaseAddressReview(G_publicKeyStr, + NULL, + &C_icon_solana_64x64, + "Verify Solana address", + NULL, + review_choice); } #endif diff --git a/src/ui/menu_nbgl.c b/src/ui/menu_nbgl.c index a0f2d84c..3cecf845 100644 --- a/src/ui/menu_nbgl.c +++ b/src/ui/menu_nbgl.c @@ -28,16 +28,23 @@ static void quit_app_callback(void) { os_sched_exit(-1); } -static const char* const info_types[] = {"Version", "Developer"}; -static const char* const info_contents[] = {APPVERSION, "Ledger"}; +#define SETTING_INFO_NB 2 +static const char* const info_types[SETTING_INFO_NB] = {"Version", "Developer"}; +static const char* const info_contents[SETTING_INFO_NB] = {APPVERSION, "Ledger"}; + +static const nbgl_contentInfoList_t infoList = { + .nbInfos = SETTING_INFO_NB, + .infoTypes = info_types, + .infoContents = info_contents, +}; enum { BLIND_SIGNING_IDX = 0, PUBLIC_KEY_LENGTH_IDX, DISPLAY_MODE_IDX, - NB_SETTINGS, + NB_SETTINGS_SWITCHES, }; -static nbgl_layoutSwitch_t G_switches[NB_SETTINGS]; +static nbgl_layoutSwitch_t G_switches[NB_SETTINGS_SWITCHES]; enum { BLIND_SIGNING_TOKEN = FIRST_USER_TOKEN, @@ -45,61 +52,45 @@ enum { DISPLAY_MODE_TOKEN, }; -#define SETTINGS_PAGE_NUMBER 2 -static bool settings_nav_callback(uint8_t page, nbgl_pageContent_t* content) { - if (page == 0) { - content->type = INFOS_LIST; - content->infosList.nbInfos = ARRAY_COUNT(info_types); - content->infosList.infoTypes = info_types; - content->infosList.infoContents = info_contents; - } else if (page == 1) { - // Read again the NVM as the value might have changed following a user touch - if (N_storage.settings.allow_blind_sign == BlindSignDisabled) { - G_switches[BLIND_SIGNING_IDX].initState = OFF_STATE; - } else { - G_switches[BLIND_SIGNING_IDX].initState = ON_STATE; - } - if (N_storage.settings.pubkey_display == PubkeyDisplayLong) { - G_switches[PUBLIC_KEY_LENGTH_IDX].initState = OFF_STATE; - } else { - G_switches[PUBLIC_KEY_LENGTH_IDX].initState = ON_STATE; - } - if (N_storage.settings.display_mode == DisplayModeUser) { - G_switches[DISPLAY_MODE_IDX].initState = OFF_STATE; - } else { - G_switches[DISPLAY_MODE_IDX].initState = ON_STATE; - } - content->type = SWITCHES_LIST; - content->switchesList.nbSwitches = NB_SETTINGS; - content->switchesList.switches = G_switches; - } else { - return false; - } +static void settings_controls_callback(int token, uint8_t index, int page); - return true; -} +// settings menu definition +#define SETTING_CONTENTS_NB 1 +static const nbgl_content_t contents[SETTING_CONTENTS_NB] = { + {.type = SWITCHES_LIST, + .content.switchesList.nbSwitches = NB_SETTINGS_SWITCHES, + .content.switchesList.switches = G_switches, + .contentActionCallback = settings_controls_callback}}; -static void settings_controls_callback(int token, uint8_t index) { +static const nbgl_genericContents_t settingContents = {.callbackCallNeeded = false, + .contentsList = contents, + .nbContents = SETTING_CONTENTS_NB}; + +static void settings_controls_callback(int token, uint8_t index, int page) { UNUSED(index); + UNUSED(page); uint8_t new_setting; switch (token) { case BLIND_SIGNING_TOKEN: - // Write in NVM the opposit of what the current toggle is + // Write in NVM the opposite of what the current toggle is new_setting = (G_switches[BLIND_SIGNING_IDX].initState != ON_STATE); + G_switches[BLIND_SIGNING_IDX].initState = (nbgl_state_t) new_setting; nvm_write((void*) &N_storage.settings.allow_blind_sign, &new_setting, sizeof(new_setting)); break; case PUBLIC_KEY_LENGTH_TOKEN: - // Write in NVM the opposit of what the current toggle is + // Write in NVM the opposite of what the current toggle is new_setting = (G_switches[PUBLIC_KEY_LENGTH_IDX].initState != ON_STATE); + G_switches[PUBLIC_KEY_LENGTH_IDX].initState = (nbgl_state_t) new_setting; nvm_write((void*) &N_storage.settings.pubkey_display, &new_setting, sizeof(new_setting)); break; case DISPLAY_MODE_TOKEN: - // Write in NVM the opposit of what the current toggle is + // Write in NVM the opposite of what the current toggle is new_setting = (G_switches[DISPLAY_MODE_IDX].initState != ON_STATE); + G_switches[DISPLAY_MODE_IDX].initState = (nbgl_state_t) new_setting; nvm_write((void*) &N_storage.settings.display_mode, &new_setting, sizeof(new_setting)); break; default: @@ -108,38 +99,44 @@ static void settings_controls_callback(int token, uint8_t index) { } } -static void ui_menu_settings(void) { +void ui_idle(void) { G_switches[BLIND_SIGNING_IDX].text = "Blind signing"; G_switches[BLIND_SIGNING_IDX].subText = "Enable blind signing"; G_switches[BLIND_SIGNING_IDX].token = BLIND_SIGNING_TOKEN; G_switches[BLIND_SIGNING_IDX].tuneId = TUNE_TAP_CASUAL; + if (N_storage.settings.allow_blind_sign == BlindSignDisabled) { + G_switches[BLIND_SIGNING_IDX].initState = OFF_STATE; + } else { + G_switches[BLIND_SIGNING_IDX].initState = ON_STATE; + } G_switches[PUBLIC_KEY_LENGTH_IDX].text = "Public key length"; G_switches[PUBLIC_KEY_LENGTH_IDX].subText = "Display short public keys"; G_switches[PUBLIC_KEY_LENGTH_IDX].token = PUBLIC_KEY_LENGTH_TOKEN; G_switches[PUBLIC_KEY_LENGTH_IDX].tuneId = TUNE_TAP_CASUAL; + if (N_storage.settings.pubkey_display == PubkeyDisplayLong) { + G_switches[PUBLIC_KEY_LENGTH_IDX].initState = OFF_STATE; + } else { + G_switches[PUBLIC_KEY_LENGTH_IDX].initState = ON_STATE; + } G_switches[DISPLAY_MODE_IDX].text = "Display mode"; G_switches[DISPLAY_MODE_IDX].subText = "Use Expert display mode"; G_switches[DISPLAY_MODE_IDX].token = DISPLAY_MODE_TOKEN; G_switches[DISPLAY_MODE_IDX].tuneId = TUNE_TAP_CASUAL; + if (N_storage.settings.display_mode == DisplayModeUser) { + G_switches[DISPLAY_MODE_IDX].initState = OFF_STATE; + } else { + G_switches[DISPLAY_MODE_IDX].initState = ON_STATE; + } - nbgl_useCaseSettings(APPNAME " settings", - 0, - SETTINGS_PAGE_NUMBER, - false, - ui_idle, - settings_nav_callback, - settings_controls_callback); -} - -void ui_idle(void) { - nbgl_useCaseHome(APPNAME, - &C_icon_solana_64x64, - NULL, - true, - ui_menu_settings, - quit_app_callback); + nbgl_useCaseHomeAndSettings(APPNAME, + &C_icon_solana_64x64, + NULL, + INIT_HOME_PAGE, + &settingContents, + &infoList, + NULL, + quit_app_callback); } - #endif diff --git a/src/ui/sign_message_nbgl.c b/src/ui/sign_message_nbgl.c index e4adfa2c..80388e4a 100644 --- a/src/ui/sign_message_nbgl.c +++ b/src/ui/sign_message_nbgl.c @@ -17,10 +17,12 @@ #include "handle_sign_message.h" #include "handle_sign_offchain_message.h" -// Layout of the review flow -static nbgl_layoutTagValueList_t layout; +// Content of the review flow +static nbgl_contentTagValueList_t content; // Used by NBGL to display the reference the pair number N static nbgl_layoutTagValue_t current_pair; +// Used to differentiate between message and transaction review +nbgl_operationType_t operation_type; // We will display at most 4 items on a Stax review screen #define MAX_SIMULTANEOUS_DISPLAYED_SLOTS NB_MAX_DISPLAYED_PAIRS_IN_REVIEW @@ -30,50 +32,6 @@ typedef struct dynamic_slot_s { } dynamic_slot_t; static dynamic_slot_t displayed_slots[MAX_SIMULTANEOUS_DISPLAYED_SLOTS]; -// Final review screen of the message signing flow -static nbgl_pageInfoLongPress_t review_final_long_press; - -static const char reject_choice_message[] = "Message\nrejected"; -static const char reject_choice_transaction[] = "Transaction\nrejected"; -static const char *reject_choice_text; - -static const char go_back_message[] = "Go back to message"; -static const char go_back_transaction[] = "Go back to transaction"; -static const char *go_back_text; - -static const char option_reject_message[] = "Reject message"; -static const char option_reject_transaction[] = "Reject transaction"; -static const char *option_reject_text; - -static const char ask_reject_message[] = "Reject message?"; -static const char ask_reject_transaction[] = "Reject transaction?"; -static const char *ask_reject_text; - -static const char success_message[] = "MESSAGE\nSIGNED"; -static const char success_transaction[] = "TRANSACTION\nSIGNED"; -static const char *success_text; - -// Callback called when the user confirms the message rejection -static void rejectChoice(void) { - sendResponse(0, ApduReplyUserRefusal, false); - nbgl_useCaseStatus(reject_choice_text, false, ui_idle); -} - -// If the user asks for message rejection, ask for confirmation -static void rejectUseCaseChoice(void) { - nbgl_useCaseConfirm(ask_reject_text, NULL, "Yes, reject", go_back_text, rejectChoice); -} - -// Callback called on the final review screen -static void review_final_callback(bool confirmed) { - if (confirmed) { - sendResponse(set_result_sign_message(), ApduReplySuccess, false); - nbgl_useCaseStatus(success_text, true, ui_idle); - } else { - rejectUseCaseChoice(); - } -} - // NBGL library has to know how many steps will be displayed static size_t transaction_steps_number; static bool last_step_is_ascii; @@ -81,7 +39,7 @@ static bool last_step_is_ascii; // function called by NBGL to get the current_pair indexed by "index" // current_pair will point at values stored in displayed_slots[] // this will enable displaying at most sizeof(displayed_slots) values simultaneously -static nbgl_layoutTagValue_t *get_single_action_review_pair(uint8_t index) { +static nbgl_contentTagValue_t *get_single_action_review_pair(uint8_t index) { uint8_t slot = index % ARRAY_COUNT(displayed_slots); // Final step is special for ASCII messages if (index == transaction_steps_number - 1 && last_step_is_ascii) { @@ -109,59 +67,59 @@ static nbgl_layoutTagValue_t *get_single_action_review_pair(uint8_t index) { return ¤t_pair; } -// Prepare the review layout structure and starts the review use_case -static void start_review(void) { - layout.nbMaxLinesForValue = 0; - layout.smallCaseForValue = false; - layout.wrapping = true; - layout.pairs = NULL; // to indicate that callback should be used - layout.callback = get_single_action_review_pair; - layout.startIndex = 0; - layout.nbPairs = transaction_steps_number; - - nbgl_useCaseStaticReview(&layout, - &review_final_long_press, - option_reject_text, - review_final_callback); +static void review_choice(bool confirm) { + // Answer, display a status page and go back to main + // validate_transaction(confirm); + nbgl_reviewStatusType_t status_type; + if (confirm) { + sendResponse(set_result_sign_message(), ApduReplySuccess, false); + if (operation_type == TYPE_MESSAGE) { + status_type = STATUS_TYPE_MESSAGE_SIGNED; + } else { + status_type = STATUS_TYPE_TRANSACTION_SIGNED; + } + nbgl_useCaseReviewStatus(status_type, ui_idle); + } else { + sendResponse(0, ApduReplyUserRefusal, false); + if (operation_type == TYPE_MESSAGE) { + status_type = STATUS_TYPE_MESSAGE_REJECTED; + } else { + status_type = STATUS_TYPE_TRANSACTION_REJECTED; + } + nbgl_useCaseReviewStatus(status_type, ui_idle); + } } void start_sign_tx_ui(size_t num_summary_steps) { - review_final_long_press.text = "Sign transaction on\nSolana network?"; - review_final_long_press.icon = &C_icon_solana_64x64; - review_final_long_press.longPressText = "Hold to sign"; - review_final_long_press.longPressToken = 0; - review_final_long_press.tuneId = TUNE_TAP_CASUAL; - - reject_choice_text = reject_choice_transaction; - go_back_text = go_back_transaction; - ask_reject_text = ask_reject_transaction; - success_text = success_transaction; - option_reject_text = option_reject_transaction; + // Set the transaction type + operation_type = TYPE_TRANSACTION; // Save steps number for later transaction_steps_number = num_summary_steps; last_step_is_ascii = false; - // start display - nbgl_useCaseReviewStart(&C_icon_solana_64x64, - "Review transaction", - NULL, - "Reject transaction", - start_review, - rejectUseCaseChoice); + + // Initialize the content structure + content.nbMaxLinesForValue = 0; + content.smallCaseForValue = false; + content.wrapping = true; + content.pairs = NULL; // to indicate that callback should be used + content.callback = get_single_action_review_pair; + content.startIndex = 0; + content.nbPairs = transaction_steps_number; + + // Start review + nbgl_useCaseReview(operation_type, + &content, + &C_icon_solana_64x64, + "Review transaction", + NULL, + "Sign transaction on Solana network?", + review_choice); } void start_sign_offchain_message_ui(bool is_ascii, size_t num_summary_steps) { - review_final_long_press.text = "Sign Off-Chain\nmessage on Solana\nnetwork?"; - review_final_long_press.icon = &C_icon_solana_64x64; - review_final_long_press.longPressText = "Hold to sign"; - review_final_long_press.longPressToken = 0; - review_final_long_press.tuneId = TUNE_TAP_CASUAL; - - reject_choice_text = reject_choice_message; - go_back_text = go_back_message; - ask_reject_text = ask_reject_message; - success_text = success_message; - option_reject_text = option_reject_message; + // Set the operation type + operation_type = TYPE_MESSAGE; // Save steps number for later transaction_steps_number = num_summary_steps; @@ -169,13 +127,23 @@ void start_sign_offchain_message_ui(bool is_ascii, size_t num_summary_steps) { if (is_ascii) { ++transaction_steps_number; } - // start display - nbgl_useCaseReviewStart(&C_icon_solana_64x64, - "Review off-chain\nmessage", - NULL, - "Reject message", - start_review, - rejectUseCaseChoice); -} + // Initialize the content structure + content.nbMaxLinesForValue = 0; + content.smallCaseForValue = false; + content.wrapping = true; + content.pairs = NULL; // to indicate that callback should be used + content.callback = get_single_action_review_pair; + content.startIndex = 0; + content.nbPairs = transaction_steps_number; + + // Start review + nbgl_useCaseReview(operation_type, + &content, + &C_icon_solana_64x64, + "Review off-chain\nmessage", + NULL, + "Sign off-chain message on Solana network?", + review_choice); +} #endif diff --git a/tests/python/apps/solana_utils.py b/tests/python/apps/solana_utils.py index 09f1a207..2fb08437 100644 --- a/tests/python/apps/solana_utils.py +++ b/tests/python/apps/solana_utils.py @@ -1,6 +1,7 @@ import base58 from pathlib import Path +from ragger.firmware import Firmware from ragger.navigator import NavInsID, NavIns from ragger.utils import create_currency_config from ragger.bip import pack_derivation_path @@ -58,8 +59,8 @@ def lamports_to_bytes(lamports: int) -> str: SOL_CONF = create_currency_config("SOL", "Solana") -def enable_blind_signing(navigator, device_name: str, snapshots_name: str): - if device_name.startswith("nano"): +def enable_blind_signing(navigator, firmware, snapshots_name: str): + if firmware.is_nano: nav = [NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Go to settings NavInsID.BOTH_CLICK, # Select blind signing NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Enable @@ -67,7 +68,6 @@ def enable_blind_signing(navigator, device_name: str, snapshots_name: str): ] else: nav = [NavInsID.USE_CASE_HOME_SETTINGS, - NavInsID.USE_CASE_SETTINGS_NEXT, NavIns(NavInsID.TOUCH, (348,132)), NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT] navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, @@ -92,48 +92,23 @@ def enable_short_public_key(navigator, device_name: str, snapshots_name: str): nav, screen_change_before_first_instruction=False) -def enable_expert_mode(navigator, device_name: str, snapshots_name: str): - if device_name.startswith("nano"): +def enable_expert_mode(navigator, firmware, snapshots_name: str): + if firmware.is_nano: nav = [NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Go to settings NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Select Expert mode NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # expert NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK # Back to main menu ] - else: + elif firmware is Firmware.STAX: nav = [NavInsID.USE_CASE_HOME_SETTINGS, - NavInsID.USE_CASE_SETTINGS_NEXT, NavIns(NavInsID.TOUCH, (348,382)), NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT] + elif firmware is Firmware.FLEX: + nav = [NavInsID.USE_CASE_HOME_SETTINGS, + NavInsID.USE_CASE_SETTINGS_NEXT, + NavIns(NavInsID.TOUCH, (250,160)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT] navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, snapshots_name, nav, screen_change_before_first_instruction=False) - -def _navigation_helper(navigator, device_name: str, accept: bool, snapshots_name: str): - if device_name.startswith("nano"): - navigate_instruction = NavInsID.RIGHT_CLICK - validation_instructions = [NavInsID.BOTH_CLICK] - if accept: - text = "Approve" - else: - text = "Reject" - else: - navigate_instruction = NavInsID.USE_CASE_REVIEW_TAP - text = "Hold to sign" - if accept: - validation_instructions = [NavInsID.USE_CASE_REVIEW_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS] - else: - validation_instructions = [NavInsID.USE_CASE_REVIEW_REJECT, NavInsID.USE_CASE_CHOICE_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS] - - - navigator.navigate_until_text_and_compare(navigate_instruction, - validation_instructions, - text, - ROOT_SCREENSHOT_PATH, - snapshots_name) - -def navigation_helper_confirm(navigator, device_name: str, snapshots_name: str): - _navigation_helper(navigator=navigator, device_name=device_name, accept=True, snapshots_name=snapshots_name) - -def navigation_helper_reject(navigator, device_name: str, snapshots_name: str): - _navigation_helper(navigator=navigator, device_name=device_name, accept=False, snapshots_name=snapshots_name) diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png new file mode 100644 index 00000000..bb05296b Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png new file mode 100644 index 00000000..ed69e933 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png new file mode 100644 index 00000000..d4fb272a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png new file mode 100644 index 00000000..64bd38ed Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png new file mode 100644 index 00000000..5122aff7 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png new file mode 100644 index 00000000..8f9d3a39 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png new file mode 100644 index 00000000..7a07d06d Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png new file mode 100644 index 00000000..c46fb9d0 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png new file mode 100644 index 00000000..8b981d44 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png new file mode 100644 index 00000000..bb05296b Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png new file mode 100644 index 00000000..ed69e933 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png new file mode 100644 index 00000000..d4fb272a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png new file mode 100644 index 00000000..64bd38ed Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png new file mode 100644 index 00000000..5122aff7 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png new file mode 100644 index 00000000..8f9d3a39 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png new file mode 100644 index 00000000..7a07d06d Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png new file mode 100644 index 00000000..c46fb9d0 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png new file mode 100644 index 00000000..0a6b1953 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png new file mode 100644 index 00000000..2d8bbe34 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00000.png new file mode 100644 index 00000000..5ee54444 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00001.png new file mode 100644 index 00000000..76d34fd8 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00002.png new file mode 100644 index 00000000..2dd7c3ed Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00003.png new file mode 100644 index 00000000..8b981d44 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_ok/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00000.png new file mode 100644 index 00000000..5ee54444 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00001.png new file mode 100644 index 00000000..76d34fd8 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00002.png new file mode 100644 index 00000000..2dd7c3ed Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00003.png new file mode 100644 index 00000000..0a6b1953 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00004.png new file mode 100644 index 00000000..2d8bbe34 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00005.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00005.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_ascii_refused/00005.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png new file mode 100644 index 00000000..bb05296b Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png new file mode 100644 index 00000000..42c6b01a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png new file mode 100644 index 00000000..42c6b01a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png new file mode 100644 index 00000000..ed69e933 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png new file mode 100644 index 00000000..d4fb272a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png new file mode 100644 index 00000000..d2ebcce4 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png new file mode 100644 index 00000000..e069cbb4 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png new file mode 100644 index 00000000..6bcb3bb3 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png new file mode 100644 index 00000000..bc78f697 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png new file mode 100644 index 00000000..8b981d44 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png new file mode 100644 index 00000000..bb05296b Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png new file mode 100644 index 00000000..42c6b01a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png new file mode 100644 index 00000000..42c6b01a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png new file mode 100644 index 00000000..ed69e933 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png new file mode 100644 index 00000000..d4fb272a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png new file mode 100644 index 00000000..d2ebcce4 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png new file mode 100644 index 00000000..e069cbb4 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png new file mode 100644 index 00000000..6bcb3bb3 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png new file mode 100644 index 00000000..bc78f697 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png new file mode 100644 index 00000000..0a6b1953 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png new file mode 100644 index 00000000..2d8bbe34 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00001.png new file mode 100644 index 00000000..bb05296b Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00002.png new file mode 100644 index 00000000..42c6b01a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00003.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_1/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00000.png new file mode 100644 index 00000000..5ee54444 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00001.png new file mode 100644 index 00000000..1d5c8531 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00002.png new file mode 100644 index 00000000..2dd7c3ed Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00003.png new file mode 100644 index 00000000..8b981d44 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_ok_2/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00000.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00001.png new file mode 100644 index 00000000..bb05296b Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00002.png new file mode 100644 index 00000000..42c6b01a Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00003.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_1/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00000.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00000.png new file mode 100644 index 00000000..5ee54444 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00000.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00001.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00001.png new file mode 100644 index 00000000..1d5c8531 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00001.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00002.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00002.png new file mode 100644 index 00000000..2dd7c3ed Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00002.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00003.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00003.png new file mode 100644 index 00000000..0a6b1953 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00003.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00004.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00004.png new file mode 100644 index 00000000..2d8bbe34 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00004.png differ diff --git a/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00005.png b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00005.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_ledger_sign_offchain_message_utf8_refused_2/00005.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_ok/00000.png b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00000.png new file mode 100644 index 00000000..30837086 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00000.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_ok/00001.png b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00001.png new file mode 100644 index 00000000..b7e9dc71 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00001.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_ok/00002.png b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00002.png new file mode 100644 index 00000000..4321e601 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00002.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_ok/00003.png b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00003.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_ok/00003.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_refused/00000.png b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00000.png new file mode 100644 index 00000000..30837086 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00000.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_refused/00001.png b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00001.png new file mode 100644 index 00000000..b7e9dc71 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00001.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_refused/00002.png b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00002.png new file mode 100644 index 00000000..45c08d4e Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00002.png differ diff --git a/tests/python/snapshots/flex/test_solana_get_public_key_refused/00003.png b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00003.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_get_public_key_refused/00003.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00000.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00000.png new file mode 100644 index 00000000..423aa0bb Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00000.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00001.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00001.png new file mode 100644 index 00000000..c92ca2f3 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00001.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00002.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00002.png new file mode 100644 index 00000000..313eb1a4 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00002.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00003.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00003.png new file mode 100644 index 00000000..be51a9d5 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00003.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00004.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_1/00004.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00000.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00000.png new file mode 100644 index 00000000..423aa0bb Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00000.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00001.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00001.png new file mode 100644 index 00000000..faab593a Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00001.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00002.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00002.png new file mode 100644 index 00000000..313eb1a4 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00002.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00003.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00003.png new file mode 100644 index 00000000..be51a9d5 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00003.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00004.png b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00004.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_ok_2/00004.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00000.png b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00000.png new file mode 100644 index 00000000..423aa0bb Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00000.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00001.png b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00001.png new file mode 100644 index 00000000..c92ca2f3 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00001.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00002.png b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00002.png new file mode 100644 index 00000000..313eb1a4 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00002.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00003.png b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00003.png new file mode 100644 index 00000000..08bca223 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00003.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00004.png b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00004.png new file mode 100644 index 00000000..6bbdf2ff Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00004.png differ diff --git a/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00005.png b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00005.png new file mode 100644 index 00000000..34a975b5 Binary files /dev/null and b/tests/python/snapshots/flex/test_solana_simple_transfer_refused/00005.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png index 68c307a6..74aaabf9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png index df47c275..03f83eb9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png index c2f047cc..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png index 9dbec60f..444eada1 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png index 5f3f4007..a3af85cc 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png index 0f52cf53..bcc09344 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png index 1272d773..4d03c5e5 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png index d3bf7539..463416f3 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png index 1c2d6cd4..54aba60e 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png index 68c307a6..74aaabf9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png index df47c275..03f83eb9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png index c2f047cc..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png index 9dbec60f..444eada1 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png index 5f3f4007..a3af85cc 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png index 0f52cf53..bcc09344 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png index 1272d773..4d03c5e5 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png index d3bf7539..463416f3 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png index d4cf6afb..56afa4b2 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png index 6ff73111..0224dee6 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00000.png index 9dbec60f..24033481 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00001.png index 1f4db0ed..eb5aaa08 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00002.png index 3646a05e..442e486f 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00003.png index 1c2d6cd4..54aba60e 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_ok/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00000.png index 9dbec60f..24033481 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00001.png index 1f4db0ed..eb5aaa08 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00002.png index 3646a05e..442e486f 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00003.png index d4cf6afb..56afa4b2 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00004.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00004.png index 6ff73111..0224dee6 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00004.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_ascii_refused/00004.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png index 68c307a6..74aaabf9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png index df47c275..ff9acbea 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png index e7471c20..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png index 68c307a6..ff9acbea 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png index e7471c20..3f47c2a5 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png index ee8e0320..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png index 9dbec60f..5d8dfb83 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png index 50287d12..12246228 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png index 93a8699a..f468704b 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png index d7f62348..02b4605a 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png index 1c2d6cd4..54aba60e 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png index 68c307a6..74aaabf9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png index df47c275..ff9acbea 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png index e7471c20..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png index 68c307a6..ff9acbea 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png index e7471c20..3f47c2a5 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png index ee8e0320..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png index 9dbec60f..5d8dfb83 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png index 50287d12..12246228 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png index 93a8699a..f468704b 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png index d7f62348..02b4605a 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png index d4cf6afb..56afa4b2 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png index 6ff73111..0224dee6 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00001.png index 68c307a6..74aaabf9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00002.png index df47c275..ff9acbea 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00003.png index e7471c20..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_1/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00000.png index 9dbec60f..24033481 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00001.png index 119f8377..a40941dd 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00002.png index 3646a05e..442e486f 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00003.png index 1c2d6cd4..54aba60e 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_ok_2/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00001.png index 68c307a6..74aaabf9 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00002.png index df47c275..ff9acbea 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00003.png index e7471c20..a63aad0d 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_1/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00000.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00000.png index 9dbec60f..24033481 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00000.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00000.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00001.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00001.png index 119f8377..a40941dd 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00001.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00001.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00002.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00002.png index 3646a05e..442e486f 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00002.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00002.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00003.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00003.png index d4cf6afb..56afa4b2 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00003.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00003.png differ diff --git a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00004.png b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00004.png index 6ff73111..0224dee6 100644 Binary files a/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00004.png and b/tests/python/snapshots/stax/test_ledger_sign_offchain_message_utf8_refused_2/00004.png differ diff --git a/tests/python/snapshots/stax/test_solana_get_public_key_ok/00000.png b/tests/python/snapshots/stax/test_solana_get_public_key_ok/00000.png index 6d2f7e89..c102fad6 100644 Binary files a/tests/python/snapshots/stax/test_solana_get_public_key_ok/00000.png and b/tests/python/snapshots/stax/test_solana_get_public_key_ok/00000.png differ diff --git a/tests/python/snapshots/stax/test_solana_get_public_key_ok/00001.png b/tests/python/snapshots/stax/test_solana_get_public_key_ok/00001.png index 9f6d0d99..737ff0d3 100644 Binary files a/tests/python/snapshots/stax/test_solana_get_public_key_ok/00001.png and b/tests/python/snapshots/stax/test_solana_get_public_key_ok/00001.png differ diff --git a/tests/python/snapshots/stax/test_solana_get_public_key_ok/00002.png b/tests/python/snapshots/stax/test_solana_get_public_key_ok/00002.png index 13499fcc..3f906b2b 100644 Binary files a/tests/python/snapshots/stax/test_solana_get_public_key_ok/00002.png and b/tests/python/snapshots/stax/test_solana_get_public_key_ok/00002.png differ diff --git a/tests/python/snapshots/stax/test_solana_get_public_key_refused/00000.png b/tests/python/snapshots/stax/test_solana_get_public_key_refused/00000.png index 6d2f7e89..c102fad6 100644 Binary files a/tests/python/snapshots/stax/test_solana_get_public_key_refused/00000.png and b/tests/python/snapshots/stax/test_solana_get_public_key_refused/00000.png differ diff --git a/tests/python/snapshots/stax/test_solana_get_public_key_refused/00001.png b/tests/python/snapshots/stax/test_solana_get_public_key_refused/00001.png index 9f6d0d99..737ff0d3 100644 Binary files a/tests/python/snapshots/stax/test_solana_get_public_key_refused/00001.png and b/tests/python/snapshots/stax/test_solana_get_public_key_refused/00001.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00000.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00000.png index 57d030b7..29558b61 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00000.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00000.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00001.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00001.png index 25e0c620..33f99a4d 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00001.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00001.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00002.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00002.png index 92e64b37..7b138b74 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00002.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00002.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00003.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00003.png index a21279c8..2ba6d27d 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00003.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_1/00003.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00000.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00000.png index 57d030b7..29558b61 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00000.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00000.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00001.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00001.png index d3195f44..55ae8d44 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00001.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00001.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00002.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00002.png index 92e64b37..7b138b74 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00002.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00002.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00003.png b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00003.png index a21279c8..2ba6d27d 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00003.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_ok_2/00003.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00000.png b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00000.png index 57d030b7..29558b61 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00000.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00000.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00001.png b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00001.png index 25e0c620..33f99a4d 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00001.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00001.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00002.png b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00002.png index 92e64b37..7b138b74 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00002.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00002.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00003.png b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00003.png index 9d261148..babad989 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00003.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00003.png differ diff --git a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00004.png b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00004.png index 17d33d6e..cebc8bed 100644 Binary files a/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00004.png and b/tests/python/snapshots/stax/test_solana_simple_transfer_refused/00004.png differ diff --git a/tests/python/test_solana.py b/tests/python/test_solana.py index 82b1c254..f71a724e 100644 --- a/tests/python/test_solana.py +++ b/tests/python/test_solana.py @@ -1,65 +1,36 @@ from ragger.backend import RaisePolicy -from ragger.navigator import NavInsID, NavIns from ragger.utils import RAPDU from .apps.solana import SolanaClient, ErrorType from .apps.solana_cmd_builder import SystemInstructionTransfer, Message, verify_signature, OffchainMessage from .apps.solana_utils import FOREIGN_PUBLIC_KEY, FOREIGN_PUBLIC_KEY_2, AMOUNT, AMOUNT_2, SOL_PACKED_DERIVATION_PATH, SOL_PACKED_DERIVATION_PATH_2, ROOT_SCREENSHOT_PATH -from .apps.solana_utils import enable_blind_signing, enable_short_public_key, enable_expert_mode, navigation_helper_confirm, navigation_helper_reject +from .apps.solana_utils import enable_blind_signing, enable_expert_mode class TestGetPublicKey: - def test_solana_get_public_key_ok(self, backend, navigator, test_name): + def test_solana_get_public_key_ok(self, backend, scenario_navigator): sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) with sol.send_public_key_with_confirm(SOL_PACKED_DERIVATION_PATH): - if backend.firmware.device.startswith("nano"): - navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, - [NavInsID.BOTH_CLICK], - "Approve", - ROOT_SCREENSHOT_PATH, - test_name) - else: - instructions = [ - NavInsID.USE_CASE_REVIEW_TAP, - NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM, - NavInsID.USE_CASE_STATUS_DISMISS - ] - navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, - test_name, - instructions) + scenario_navigator.address_review_approve(path=ROOT_SCREENSHOT_PATH) assert sol.get_async_response().data == from_public_key - def test_solana_get_public_key_refused(self, backend, navigator, test_name): + def test_solana_get_public_key_refused(self, backend, scenario_navigator): sol = SolanaClient(backend) with sol.send_public_key_with_confirm(SOL_PACKED_DERIVATION_PATH): backend.raise_policy = RaisePolicy.RAISE_NOTHING - if backend.firmware.device.startswith("nano"): - navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, - [NavInsID.BOTH_CLICK], - "Reject", - ROOT_SCREENSHOT_PATH, - test_name) - else: - instructions = [ - NavInsID.USE_CASE_REVIEW_TAP, - NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CANCEL, - NavInsID.USE_CASE_STATUS_DISMISS - ] - navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, - test_name, - instructions) + scenario_navigator.address_review_reject(path=ROOT_SCREENSHOT_PATH) assert sol.get_async_response().status == ErrorType.USER_CANCEL class TestMessageSigning: - def test_solana_simple_transfer_ok_1(self, backend, navigator, test_name): + def test_solana_simple_transfer_ok_1(self, backend, scenario_navigator): sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) @@ -68,13 +39,13 @@ def test_solana_simple_transfer_ok_1(self, backend, navigator, test_name): message: bytes = Message([instruction]).serialize() with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_confirm(navigator, backend.firmware.device, test_name) + scenario_navigator.review_approve(path=ROOT_SCREENSHOT_PATH) signature: bytes = sol.get_async_response().data verify_signature(from_public_key, message, signature) - def test_solana_simple_transfer_ok_2(self, backend, navigator, test_name): + def test_solana_simple_transfer_ok_2(self, backend, scenario_navigator): sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH_2) @@ -83,13 +54,13 @@ def test_solana_simple_transfer_ok_2(self, backend, navigator, test_name): message: bytes = Message([instruction]).serialize() with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH_2, message): - navigation_helper_confirm(navigator, backend.firmware.device, test_name) + scenario_navigator.review_approve(path=ROOT_SCREENSHOT_PATH) signature: bytes = sol.get_async_response().data verify_signature(from_public_key, message, signature) - def test_solana_simple_transfer_refused(self, backend, navigator, test_name): + def test_solana_simple_transfer_refused(self, backend, scenario_navigator): sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) @@ -98,7 +69,7 @@ def test_solana_simple_transfer_refused(self, backend, navigator, test_name): backend.raise_policy = RaisePolicy.RAISE_NOTHING with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_reject(navigator, backend.firmware.device, test_name) + scenario_navigator.review_reject(path=ROOT_SCREENSHOT_PATH) rapdu: RAPDU = sol.get_async_response() assert rapdu.status == ErrorType.USER_CANCEL @@ -106,7 +77,7 @@ def test_solana_simple_transfer_refused(self, backend, navigator, test_name): class TestOffchainMessageSigning: - def test_ledger_sign_offchain_message_ascii_ok(self, backend, navigator, test_name): + def test_ledger_sign_offchain_message_ascii_ok(self, backend, scenario_navigator): sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) @@ -114,29 +85,28 @@ def test_ledger_sign_offchain_message_ascii_ok(self, backend, navigator, test_na message: bytes = offchain_message.serialize() with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_confirm(navigator, backend.firmware.device, test_name) + scenario_navigator.review_approve(path=ROOT_SCREENSHOT_PATH) signature: bytes = sol.get_async_response().data verify_signature(from_public_key, message, signature) - def test_ledger_sign_offchain_message_ascii_refused(self, backend, navigator, test_name): + def test_ledger_sign_offchain_message_ascii_refused(self, backend, scenario_navigator): sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) offchain_message: OffchainMessage = OffchainMessage(0, b"Test message") message: bytes = offchain_message.serialize() backend.raise_policy = RaisePolicy.RAISE_NOTHING with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_reject(navigator, backend.firmware.device, test_name) + scenario_navigator.review_reject(path=ROOT_SCREENSHOT_PATH) rapdu: RAPDU = sol.get_async_response() assert rapdu.status == ErrorType.USER_CANCEL - def test_ledger_sign_offchain_message_ascii_expert_ok(self, backend, navigator, test_name): - enable_expert_mode(navigator, backend.firmware.device, test_name + "_1") + def test_ledger_sign_offchain_message_ascii_expert_ok(self, backend, scenario_navigator, navigator, test_name): + enable_expert_mode(navigator, backend.firmware, test_name + "_1") sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) @@ -145,31 +115,30 @@ def test_ledger_sign_offchain_message_ascii_expert_ok(self, backend, navigator, message: bytes = offchain_message.serialize() with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_confirm(navigator, backend.firmware.device, test_name + "_2") + scenario_navigator.review_approve(path=ROOT_SCREENSHOT_PATH, test_name=test_name + "_2") signature: bytes = sol.get_async_response().data verify_signature(from_public_key, message, signature) - def test_ledger_sign_offchain_message_ascii_expert_refused(self, backend, navigator, test_name): - enable_expert_mode(navigator, backend.firmware.device, test_name + "_1") + def test_ledger_sign_offchain_message_ascii_expert_refused(self, backend, scenario_navigator, navigator, test_name): + enable_expert_mode(navigator, backend.firmware, test_name + "_1") sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) offchain_message: OffchainMessage = OffchainMessage(0, b"Test message") message: bytes = offchain_message.serialize() backend.raise_policy = RaisePolicy.RAISE_NOTHING with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_reject(navigator, backend.firmware.device, test_name + "_2") + scenario_navigator.review_reject(path=ROOT_SCREENSHOT_PATH, test_name=test_name + "_2") rapdu: RAPDU = sol.get_async_response() assert rapdu.status == ErrorType.USER_CANCEL - def test_ledger_sign_offchain_message_utf8_ok(self, backend, navigator, test_name): - enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") + def test_ledger_sign_offchain_message_utf8_ok(self, backend, scenario_navigator, navigator, test_name): + enable_blind_signing(navigator, backend.firmware, test_name + "_1") sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) @@ -178,32 +147,31 @@ def test_ledger_sign_offchain_message_utf8_ok(self, backend, navigator, test_nam message: bytes = offchain_message.serialize() with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_confirm(navigator, backend.firmware.device, test_name + "_2") + scenario_navigator.review_approve(path=ROOT_SCREENSHOT_PATH, test_name=test_name + "_2") signature: bytes = sol.get_async_response().data verify_signature(from_public_key, message, signature) - def test_ledger_sign_offchain_message_utf8_refused(self, backend, navigator, test_name): - enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") + def test_ledger_sign_offchain_message_utf8_refused(self, backend, scenario_navigator, navigator, test_name): + enable_blind_signing(navigator, backend.firmware, test_name + "_1") sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) offchain_message: OffchainMessage = OffchainMessage(0, bytes("Тестовое сообщение", 'utf-8')) message: bytes = offchain_message.serialize() backend.raise_policy = RaisePolicy.RAISE_NOTHING with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_reject(navigator, backend.firmware.device, test_name + "_2") + scenario_navigator.review_reject(path=ROOT_SCREENSHOT_PATH, test_name=test_name + "_2") rapdu: RAPDU = sol.get_async_response() assert rapdu.status == ErrorType.USER_CANCEL - def test_ledger_sign_offchain_message_utf8_expert_ok(self, backend, navigator, test_name): - enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") - enable_expert_mode(navigator, backend.firmware.device, test_name + "_2") + def test_ledger_sign_offchain_message_utf8_expert_ok(self, backend, scenario_navigator, navigator, test_name): + enable_blind_signing(navigator, backend.firmware, test_name + "_1") + enable_expert_mode(navigator, backend.firmware, test_name + "_2") sol = SolanaClient(backend) from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) @@ -212,25 +180,24 @@ def test_ledger_sign_offchain_message_utf8_expert_ok(self, backend, navigator, t message: bytes = offchain_message.serialize() with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_confirm(navigator, backend.firmware.device, test_name + "_3") + scenario_navigator.review_approve(path=ROOT_SCREENSHOT_PATH, test_name=test_name + "_3") signature: bytes = sol.get_async_response().data verify_signature(from_public_key, message, signature) - def test_ledger_sign_offchain_message_utf8_expert_refused(self, backend, navigator, test_name): - enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") - enable_expert_mode(navigator, backend.firmware.device, test_name + "_2") + def test_ledger_sign_offchain_message_utf8_expert_refused(self, backend, scenario_navigator, navigator, test_name): + enable_blind_signing(navigator, backend.firmware, test_name + "_1") + enable_expert_mode(navigator, backend.firmware, test_name + "_2") sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) offchain_message: OffchainMessage = OffchainMessage(0, bytes("Тестовое сообщение", 'utf-8')) message: bytes = offchain_message.serialize() backend.raise_policy = RaisePolicy.RAISE_NOTHING with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): - navigation_helper_reject(navigator, backend.firmware.device, test_name + "_3") + scenario_navigator.review_reject(path=ROOT_SCREENSHOT_PATH, test_name=test_name + "_3") rapdu: RAPDU = sol.get_async_response() assert rapdu.status == ErrorType.USER_CANCEL