diff --git a/Makefile b/Makefile index 2ce71f4..c850adc 100755 --- a/Makefile +++ b/Makefile @@ -23,8 +23,8 @@ include $(BOLOS_SDK)/Makefile.defines APP_LOAD_PARAMS= --curve secp256k1 $(COMMON_LOAD_PARAMS) APPVERSION_M=1 -APPVERSION_N=2 -APPVERSION_P=3 +APPVERSION_N=3 +APPVERSION_P=1 APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) # Celo @@ -34,7 +34,7 @@ APP_LOAD_PARAMS += --path "44'/60'/0'/0/0" --path "44'/60'/0'" --path "44'/60'/0 APPNAME = "Celo" APP_LOAD_FLAGS=--appFlags 0 -ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX TARGET_FLEX)) APP_LOAD_FLAGS=--appFlags 0x200 # APPLICATION_FLAG_BOLOS_SETTINGS endif APP_LOAD_PARAMS += $(APP_LOAD_FLAGS) @@ -42,8 +42,10 @@ APP_LOAD_PARAMS += $(APP_LOAD_FLAGS) #prepare hsm generation ifeq ($(TARGET_NAME), TARGET_NANOS) ICONNAME=nanos_app_celo.gif -else ifeq ($(TARGET_NAME),TARGET_STAX) +else ifeq ($(TARGET_NAME), TARGET_STAX) ICONNAME=stax_app_celo.gif +else ifeq ($(TARGET_NAME), TARGET_FLEX) +ICONNAME=flex_app_celo.gif else ICONNAME=nanox_app_celo.gif endif @@ -75,7 +77,7 @@ DEFINES += APPVERSION=\"$(APPVERSION)\" DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=0 WEBUSB_URL="" -ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX TARGET_FLEX)) DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000 DEFINES += HAVE_BLE_APDU # basic ledger apdu transport over BLE endif @@ -86,7 +88,7 @@ else DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300 endif -ifeq ($(TARGET_NAME),TARGET_STAX) +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_FLEX TARGET_STAX)) DEFINES += NBGL_QRCODE SDK_SOURCE_PATH += qrcode else @@ -152,11 +154,11 @@ include $(BOLOS_SDK)/Makefile.glyphs APP_SOURCE_PATH += src_common src SDK_SOURCE_PATH += lib_stusb lib_stusb_impl lib_u2f -ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX TARGET_FLEX)) SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl endif -ifneq ($(TARGET_NAME),TARGET_STAX) +ifneq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_FLEX TARGET_STAX)) SDK_SOURCE_PATH += lib_ux endif diff --git a/README.md b/README.md index 16939ce..1e8dd51 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Celo app for Ledger Wallet -This app adds support for the Celo native token for the Ledger Nano S/X/SP and Stax. +This app adds support for the Celo native token for the Ledger Nano S/X/SP/Stax and Flex. ## Quick start guide @@ -80,6 +80,7 @@ You can choose which device to compile and load for by setting the `BOLOS_SDK` e - `BOLOS_SDK=$NANOX_SDK` - `BOLOS_SDK=$NANOSP_SDK` - `BOLOS_SDK=$STAX_SDK` +- `BOLOS_SDK=$FLEX_SDK` By default this variable is set to build/load for Nano S. @@ -206,3 +207,4 @@ It outputs 3 artifacts: - `compiled_app_binaries` within binary files of the build process for each device - `code-coverage` within HTML details of code coverage - `documentation` within HTML auto-generated documentation + diff --git a/flex_app_celo.gif b/flex_app_celo.gif new file mode 100644 index 0000000..f899e55 Binary files /dev/null and b/flex_app_celo.gif differ diff --git a/glyphs/celo_64px.gif b/glyphs/celo_64px.gif index 2cd945c..b61f5f4 100644 Binary files a/glyphs/celo_64px.gif and b/glyphs/celo_64px.gif differ diff --git a/ledger_app.toml b/ledger_app.toml index ab5340f..05e1f00 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] unit_directory = "./tests/unit" diff --git a/src/main.c b/src/main.c index 226d72c..c8c03b6 100644 --- a/src/main.c +++ b/src/main.c @@ -849,7 +849,7 @@ __attribute__((section(".boot"))) int main(void) { if (N_storage.initialized != 0x01) { internalStorage_t storage; - storage.dataAllowed = 0x01; + storage.dataAllowed = 0x00; storage.contractDetails = 0x00; storage.initialized = 0x01; nvm_write(&N_storage, (void*)&storage, sizeof(internalStorage_t)); diff --git a/src/ui_confirm_selector_nbgl.c b/src/ui_confirm_selector_nbgl.c index 9b6279c..f0c0439 100644 --- a/src/ui_confirm_selector_nbgl.c +++ b/src/ui_confirm_selector_nbgl.c @@ -14,44 +14,35 @@ static void approveCallback(void) { static void confirmationCallback(bool confirm) { if (confirm) { - nbgl_useCaseStatus("SELECTOR\nAPPROVED", true, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_OPERATION_SIGNED, ui_idle); approveCallback(); } else { - nbgl_useCaseStatus("Selector rejected", false, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_OPERATION_REJECTED, ui_idle); rejectCallback(); } } -static void continueCallback(void) { - tagValueList.pairs = tagValuePair; - tagValueList.smallCaseForValue = false; - - infoLongPress.text = "Approve selector"; - infoLongPress.icon = &C_celo_64px; - infoLongPress.longPressText = "Hold to sign"; - infoLongPress.longPressToken = 0; - infoLongPress.tuneId = TUNE_TAP_CASUAL; - - nbgl_useCaseStaticReview(&tagValueList, &infoLongPress, "Cancel", confirmationCallback); -} - void ui_confirm_selector_flow(void) { tagValuePair[0].item = "Selector"; tagValuePair[0].value = (char*)strings.tmp.tmp; + tagValueList.nbMaxLinesForValue = 0; tagValueList.nbPairs = 1; + tagValueList.pairs = tagValuePair; - nbgl_useCaseReviewStart(&C_celo_64px, "Verify selector", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Verify selector", NULL, "Confirm selector", confirmationCallback); } void ui_confirm_parameter_flow(void) { tagValuePair[0].item = "Parameter"; tagValuePair[0].value = (char*)strings.tmp.tmp; + tagValueList.nbMaxLinesForValue = 0; tagValueList.nbPairs = 1; + tagValueList.pairs = tagValuePair; - nbgl_useCaseReviewStart(&C_celo_64px, "Verify", strings.tmp.tmp2, "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Verify", NULL, "Confirm", confirmationCallback); } #endif // HAVE_NBGL diff --git a/src/ui_display_public_nbgl.c b/src/ui_display_public_nbgl.c index 814535c..79376b9 100644 --- a/src/ui_display_public_nbgl.c +++ b/src/ui_display_public_nbgl.c @@ -4,13 +4,13 @@ #include "bolos_target.h" static void address_cancel(void) { - nbgl_useCaseStatus("Address rejected", false, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_REJECTED, ui_idle); io_seproxyhal_touch_address_cancel(); } static void address_confirmation(bool confirm) { if (confirm) { - nbgl_useCaseStatus("ADDRESS\nAPPROVED", true, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_VERIFIED, ui_idle); io_seproxyhal_touch_address_ok(); } else { @@ -18,17 +18,13 @@ static void address_confirmation(bool confirm) { } } -static void address_display(void) { - nbgl_useCaseAddressConfirmation(strings.common.fullAddress, address_confirmation); -} - void ui_display_public_flow(void) { - nbgl_useCaseReviewStart(&C_celo_64px, - "Verify Celo\naddress", - "", - "Cancel", - address_display, - address_cancel); + nbgl_useCaseAddressReview(tmpCtx.publicKeyContext.address, + NULL, + &C_celo_64px, + "Verify Celo\naddress", + NULL, + address_confirmation); } #endif // HAVE_NBGL diff --git a/src/ui_settings_nbgl.c b/src/ui_settings_nbgl.c index ea9aa3c..e1f29a1 100644 --- a/src/ui_settings_nbgl.c +++ b/src/ui_settings_nbgl.c @@ -10,9 +10,8 @@ #define IS_TOUCHABLE false // Forward declaration -static void displaySettingsMenu(void); -static void settingsControlsCallback(int token, uint8_t index); -static bool settingsNavCallback(uint8_t page, nbgl_pageContent_t *content); +static uint8_t initSettingPage; +static void controls_callback(int token, uint8_t index, int page); enum { SWITCH_CONTRACT_DATA_SET_TOKEN = FIRST_USER_TOKEN, @@ -20,44 +19,33 @@ enum { NB_SETTINGS_SWITCHES, }; -static nbgl_layoutSwitch_t switches[NB_SETTINGS_SWITCHES - FIRST_USER_TOKEN]; +static nbgl_contentSwitch_t switches[NB_SETTINGS_SWITCHES - FIRST_USER_TOKEN]; -static const char* const infoTypes[] = {"Version", "Celo App"}; -static const char* const infoContents[] = {APPVERSION, "(c) 2022 Ledger"}; +static const char* const infoTypes[NB_INFO_FIELDS] = {"Version", "Celo App"}; +static const char* const infoContents[NB_INFO_FIELDS] = {APPVERSION, "(c) 2022 Ledger"}; static void onQuitCallback(void) { os_sched_exit(-1); } -static bool settingsNavCallback(uint8_t page, nbgl_pageContent_t *content) { - if (page == 0) { - content->type = INFOS_LIST; - content->infosList.nbInfos = NB_INFO_FIELDS; - content->infosList.infoTypes = (const char**) infoTypes; - content->infosList.infoContents = (const char**) infoContents; - } - else if (page == 1) { - switches[0].text = "Contract data"; - switches[0].subText = "Allow contract data\nin transactions"; - switches[0].token = SWITCH_CONTRACT_DATA_SET_TOKEN; - switches[0].tuneId = TUNE_TAP_CASUAL; - switches[0].initState = N_storage.dataAllowed; +static const nbgl_contentInfoList_t infoList = { + .nbInfos = NB_INFO_FIELDS, + .infoTypes = (const char**) infoTypes, + .infoContents = (const char**) infoContents, +}; - switches[1].text = "Debug data"; - switches[1].subText = "Display contract data details"; - switches[1].token = SWITCH_DEBUG_DATA_SET_TOKEN; - switches[1].tuneId = TUNE_TAP_CASUAL; - switches[1].initState = N_storage.contractDetails; - content->type = SWITCHES_LIST; - content->switchesList.nbSwitches = NB_SETTINGS_SWITCHES - FIRST_USER_TOKEN, - content->switchesList.switches = (nbgl_layoutSwitch_t*) switches; - } - else { - return false; - } - 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 - FIRST_USER_TOKEN, + .content.switchesList.switches = (nbgl_layoutSwitch_t*) switches, + .contentActionCallback = controls_callback}}; + +static const nbgl_genericContents_t settingContents = {.callbackCallNeeded = false, + .contentsList = contents, + .nbContents = SETTING_CONTENTS_NB}; static void switch_settings_contract_data() { uint8_t value = (N_storage.dataAllowed ? 0 : 1); @@ -68,14 +56,14 @@ static void switch_settings_display_data() { uint8_t value = (N_storage.contractDetails ? 0 : 1); nvm_write(&N_storage.contractDetails, (void*)&value, sizeof(uint8_t)); } - -static void settingsControlsCallback(int token, uint8_t index) { +static void controls_callback(int token, uint8_t index, int page) { UNUSED(index); + initSettingPage = page; switch(token) { case SWITCH_CONTRACT_DATA_SET_TOKEN: switch_settings_contract_data(); - break; + break; case SWITCH_DEBUG_DATA_SET_TOKEN: switch_settings_display_data(); @@ -88,19 +76,31 @@ static void settingsControlsCallback(int token, uint8_t index) { switches[0].initState = N_storage.dataAllowed; switches[1].initState = N_storage.contractDetails; - - displaySettingsMenu(); -} - -static void displaySettingsMenu(void) { - nbgl_useCaseSettings("Celo settings", PAGE_START, NB_PAGE_SETTING, IS_TOUCHABLE, ui_idle, - settingsNavCallback, settingsControlsCallback); } void ui_idle(void) { - nbgl_useCaseHome("Celo", &C_celo_64px, - NULL, true, - displaySettingsMenu, onQuitCallback); + switches[0].initState = N_storage.dataAllowed; + switches[0].text = "Contract data"; + switches[0].subText = "Allow contract data\nin transactions"; + switches[0].token = SWITCH_CONTRACT_DATA_SET_TOKEN; + switches[0].tuneId = TUNE_TAP_CASUAL; + + switches[1].initState = N_storage.contractDetails; + switches[1].text = "Debug data"; + switches[1].subText = "Display contract data details"; + switches[1].token = SWITCH_DEBUG_DATA_SET_TOKEN; + switches[1].tuneId = TUNE_TAP_CASUAL; + + nbgl_useCaseHomeAndSettings( + "Celo", + &C_celo_64px, + NULL, + INIT_HOME_PAGE, + &settingContents, + &infoList, + NULL, + onQuitCallback + ); } #endif // HAVE_NBGL diff --git a/src/ui_sign_nbgl.c b/src/ui_sign_nbgl.c index 7d16d78..3486429 100644 --- a/src/ui_sign_nbgl.c +++ b/src/ui_sign_nbgl.c @@ -5,13 +5,13 @@ #include "bolos_target.h" static void sign_cancel(void) { - nbgl_useCaseStatus("Message rejected", false, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_MESSAGE_REJECTED, ui_idle); io_seproxyhal_touch_signMessage_cancel(); } static void sign_confirmation(bool confirm) { if (confirm) { - nbgl_useCaseStatus("MESSAGE\nAPPROVED", true, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_MESSAGE_SIGNED, ui_idle); io_seproxyhal_touch_signMessage_ok(); } else { @@ -19,7 +19,7 @@ static void sign_confirmation(bool confirm) { } } -static void sign_display(void) { +void ui_display_sign_flow(void) { tagValuePair[0].item = "Message hash"; tagValuePair[0].value = (char*)strings.common.fullAddress; @@ -27,21 +27,6 @@ static void sign_display(void) { tagValueList.pairs = tagValuePair; tagValueList.smallCaseForValue = false; - infoLongPress.text = "Sign message"; - infoLongPress.icon = &C_celo_64px; - infoLongPress.longPressText = "Hold to sign"; - infoLongPress.longPressToken = 0; - infoLongPress.tuneId = TUNE_TAP_CASUAL; - - nbgl_useCaseStaticReview(&tagValueList, &infoLongPress, "Cancel", sign_confirmation); -} - -void ui_display_sign_flow(void) { - nbgl_useCaseReviewStart(&C_celo_64px, - "Review message", - "", - "Cancel", - sign_display, - sign_cancel); + nbgl_useCaseReview(TYPE_MESSAGE, &tagValueList, &C_celo_64px, "Review message", NULL, "Sign message", sign_confirmation); } #endif // HAVE_NBGL diff --git a/src/ui_tx_nbgl.c b/src/ui_tx_nbgl.c index c26222a..56548de 100644 --- a/src/ui_tx_nbgl.c +++ b/src/ui_tx_nbgl.c @@ -14,11 +14,11 @@ static void approveCallback(void) { static void confirmationCallback(bool confirm) { if (confirm) { - nbgl_useCaseStatus("TRANSACTION\nAPPROVED", true, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, ui_idle); approveCallback(); } else { - nbgl_useCaseStatus("Transaction rejected", false, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, ui_idle); rejectCallback(); } } @@ -36,7 +36,7 @@ static void continueCallback(void) { } static void warningCallback(void) { - nbgl_useCaseReviewStart(&C_warning64px, "WARNING", "Data present", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReviewStart(&C_Warning_64px, "WARNING", "Data present", "Cancel", continueCallback, rejectCallback); } static void fill_data_tx(void) { @@ -50,6 +50,7 @@ static void fill_data_tx(void) { tagValuePair[2].value = (char*)strings.common.maxFee; tagValueList.nbPairs = 3; + tagValueList.pairs = tagValuePair; } static void fill_gateway_tx(void) { @@ -69,6 +70,7 @@ static void fill_gateway_tx(void) { tagValuePair[4].value = (char*)strings.common.fullGatewayAddress; tagValueList.nbPairs = 5; + tagValueList.pairs = tagValuePair; } static void fill_lock_relock(void) { @@ -82,6 +84,7 @@ static void fill_lock_relock(void) { tagValuePair[2].value = (char*)strings.common.maxFee; tagValueList.nbPairs = 3; + tagValueList.pairs = tagValuePair; } static void fill_withdraw_or_create_account(void) { @@ -92,6 +95,7 @@ static void fill_withdraw_or_create_account(void) { tagValuePair[1].value = (char*)strings.common.maxFee; tagValueList.nbPairs = 2; + tagValueList.pairs = tagValuePair; } static void fill_activate(void) { @@ -105,6 +109,7 @@ static void fill_activate(void) { tagValuePair[2].value = (char*)strings.common.maxFee; tagValueList.nbPairs = 3; + tagValueList.pairs = tagValuePair; } static void fill_vote_revoke(void) { @@ -121,11 +126,12 @@ static void fill_vote_revoke(void) { tagValuePair[3].value = (char*)strings.common.maxFee; tagValueList.nbPairs = 4; + tagValueList.pairs = tagValuePair; } void ui_approval_celo_tx_flow(void) { fill_data_tx(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback); } void ui_approval_celo_data_warning_tx_flow(void) { @@ -135,7 +141,7 @@ void ui_approval_celo_data_warning_tx_flow(void) { void ui_approval_celo_gateway_tx_flow(void) { fill_gateway_tx(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback); } void ui_approval_celo_data_warning_gateway_tx_flow(void) { @@ -145,32 +151,31 @@ void ui_approval_celo_data_warning_gateway_tx_flow(void) { void ui_approval_celo_lock_unlock_flow(void) { fill_lock_relock(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback); } void ui_approval_celo_relock_flow(void) { fill_lock_relock(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback); } void ui_approval_celo_withdraw_flow(void) { fill_withdraw_or_create_account(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback); } void ui_approval_celo_create_account_flow(void) { fill_withdraw_or_create_account(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); -} + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback);} void ui_approval_celo_activate_flow(void) { fill_activate(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback); } void ui_approval_celo_vote_revoke_flow(void) { fill_vote_revoke(); - nbgl_useCaseReviewStart(&C_celo_64px, "Review transaction", "", "Cancel", continueCallback, rejectCallback); + nbgl_useCaseReview(TYPE_TRANSACTION, &tagValueList, &C_celo_64px, "Review transaction", NULL, "Approve Transaction", confirmationCallback); } #endif // HAVE_NBGL diff --git a/tests/python/apps/celo.py b/tests/python/apps/celo.py index 079df55..896b7cc 100644 --- a/tests/python/apps/celo.py +++ b/tests/python/apps/celo.py @@ -24,7 +24,7 @@ class INS(IntEnum): class StatusCode(IntEnum): STATUS_OK = 0x9000 STATUS_DEPRECATED = 0x6501 - + STATUS_ERROR_IN_DATA = 0x6A80 class Param(IntEnum): P1_DirectlyFetchAddress = 0x00 # Return address directly from the wallet diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00000.png b/tests/python/snapshots/flex/test_celo_derive_address/00000.png new file mode 100644 index 0000000..3c5f5e0 Binary files /dev/null and b/tests/python/snapshots/flex/test_celo_derive_address/00000.png differ diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00001.png b/tests/python/snapshots/flex/test_celo_derive_address/00001.png new file mode 100644 index 0000000..ad3809f Binary files /dev/null and b/tests/python/snapshots/flex/test_celo_derive_address/00001.png differ diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00002.png b/tests/python/snapshots/flex/test_celo_derive_address/00002.png new file mode 100644 index 0000000..0acd7a7 Binary files /dev/null and b/tests/python/snapshots/flex/test_celo_derive_address/00002.png differ diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00003.png b/tests/python/snapshots/flex/test_celo_derive_address/00003.png new file mode 100644 index 0000000..ad3809f Binary files /dev/null and b/tests/python/snapshots/flex/test_celo_derive_address/00003.png differ diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00004.png b/tests/python/snapshots/flex/test_celo_derive_address/00004.png new file mode 100644 index 0000000..4321e60 Binary files /dev/null and b/tests/python/snapshots/flex/test_celo_derive_address/00004.png differ diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00005.png b/tests/python/snapshots/flex/test_celo_derive_address/00005.png new file mode 100644 index 0000000..b174685 Binary files /dev/null and b/tests/python/snapshots/flex/test_celo_derive_address/00005.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00000.png b/tests/python/snapshots/flex/test_sign_data/00000.png new file mode 100644 index 0000000..40bc550 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_data/00000.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00001.png b/tests/python/snapshots/flex/test_sign_data/00001.png new file mode 100644 index 0000000..2f1d84c Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_data/00001.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00002.png b/tests/python/snapshots/flex/test_sign_data/00002.png new file mode 100644 index 0000000..b8660cf Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_data/00002.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00003.png b/tests/python/snapshots/flex/test_sign_data/00003.png new file mode 100644 index 0000000..8b981d4 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_data/00003.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00004.png b/tests/python/snapshots/flex/test_sign_data/00004.png new file mode 100644 index 0000000..b174685 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_data/00004.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00000.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00000.png new file mode 100644 index 0000000..36b9a9b Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00000.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00001.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00001.png new file mode 100644 index 0000000..70a6e6e Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00001.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00002.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00002.png new file mode 100644 index 0000000..9d8e493 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00002.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00003.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00003.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00004.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00004.png new file mode 100644 index 0000000..b174685 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00004.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00000.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00000.png new file mode 100644 index 0000000..36b9a9b Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00000.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00001.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00001.png new file mode 100644 index 0000000..c962f67 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00001.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..9d8e493 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00004.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00004.png new file mode 100644 index 0000000..b174685 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00004.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 5adfa7b..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index ca25a81..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00004.png deleted file mode 100644 index 0b16c59..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00004.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00005.png deleted file mode 100644 index dfdb1c4..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00005.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00006.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00006.png deleted file mode 100644 index 0130ea2..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00006.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00007.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00007.png deleted file mode 100644 index 44f0d51..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00007.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00008.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00008.png deleted file mode 100644 index 42924db..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00008.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00000.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00000.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00000.png diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00001.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00002.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00001.png diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..e5e9945 Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..455b7fb Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00004.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00004.png new file mode 100644 index 0000000..01165c8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00004.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00005.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00005.png new file mode 100644 index 0000000..e3bb2ad Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00005.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00009.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00006.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00009.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00006.png diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00010.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00007.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00010.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00007.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 8fc8955..0000000 Binary files a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index 5693d0e..0000000 Binary files a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00004.png deleted file mode 100644 index b29ef0c..0000000 Binary files a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00004.png and /dev/null differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00000.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00000.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00000.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00001.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00002.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00001.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..9fd8cd9 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..d158d51 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00004.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00005.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00004.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00006.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00005.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00006.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00005.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 8fc8955..0000000 Binary files a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index 5693d0e..0000000 Binary files a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00004.png deleted file mode 100644 index b29ef0c..0000000 Binary files a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00004.png and /dev/null differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00000.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00000.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00000.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00001.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00002.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00001.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..9fd8cd9 Binary files /dev/null and b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..d158d51 Binary files /dev/null and b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00004.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00005.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00004.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00006.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00005.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00006.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00005.png diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00000.png b/tests/python/snapshots/stax/test_celo_derive_address/00000.png index e819ad6..bfb8d13 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00000.png and b/tests/python/snapshots/stax/test_celo_derive_address/00000.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00001.png b/tests/python/snapshots/stax/test_celo_derive_address/00001.png index 4951441..cb33abe 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00001.png and b/tests/python/snapshots/stax/test_celo_derive_address/00001.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00002.png b/tests/python/snapshots/stax/test_celo_derive_address/00002.png index 925d273..92ab0a3 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00002.png and b/tests/python/snapshots/stax/test_celo_derive_address/00002.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00003.png b/tests/python/snapshots/stax/test_celo_derive_address/00003.png index 4951441..cb33abe 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00003.png and b/tests/python/snapshots/stax/test_celo_derive_address/00003.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00004.png b/tests/python/snapshots/stax/test_celo_derive_address/00004.png index e5a5f1f..7a49478 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00004.png and b/tests/python/snapshots/stax/test_celo_derive_address/00004.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00005.png b/tests/python/snapshots/stax/test_celo_derive_address/00005.png index edcc879..571dfa7 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00005.png and b/tests/python/snapshots/stax/test_celo_derive_address/00005.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00000.png b/tests/python/snapshots/stax/test_sign_data/00000.png index 30470eb..a08ebe3 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00000.png and b/tests/python/snapshots/stax/test_sign_data/00000.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00001.png b/tests/python/snapshots/stax/test_sign_data/00001.png index d89d8dc..5259473 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00001.png and b/tests/python/snapshots/stax/test_sign_data/00001.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00002.png b/tests/python/snapshots/stax/test_sign_data/00002.png index 3ec7bd5..c48b35c 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00002.png and b/tests/python/snapshots/stax/test_sign_data/00002.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00003.png b/tests/python/snapshots/stax/test_sign_data/00003.png index 512ecf7..cfee3ae 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00003.png and b/tests/python/snapshots/stax/test_sign_data/00003.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00004.png b/tests/python/snapshots/stax/test_sign_data/00004.png index edcc879..571dfa7 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00004.png and b/tests/python/snapshots/stax/test_sign_data/00004.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png index e85f35a..f72f36e 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00001.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00001.png index 0d5572e..cb67d88 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00001.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00001.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png index fb6ac54..da02a30 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00003.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00003.png index e1fc433..392165d 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00003.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00003.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png index edcc879..571dfa7 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00000.png deleted file mode 100644 index e85f35a..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00000.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 1938eab..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00002.png deleted file mode 100644 index 368397c..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00002.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index fb6ac54..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00004.png deleted file mode 100644 index e1fc433..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00004.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00005.png deleted file mode 100644 index edcc879..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00005.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00000.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00000.png new file mode 100644 index 0000000..f72f36e Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00000.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00001.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00001.png new file mode 100644 index 0000000..85aaafb Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00001.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..da02a30 Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..392165d Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00004.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00004.png new file mode 100644 index 0000000..571dfa7 Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00004.png differ diff --git a/tests/python/test_celo.py b/tests/python/test_celo.py index 9ae0c5a..a406c6b 100644 --- a/tests/python/test_celo.py +++ b/tests/python/test_celo.py @@ -19,7 +19,7 @@ def test_celo_derive_address(test_name, backend, firmware, show, chaincode, navi instructions = get_nano_review_instructions(4) elif firmware.device.startswith("nano"): instructions = get_nano_review_instructions(2) - else: + elif firmware.device == "stax": instructions = [ NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), NavIns(NavInsID.TOUCH, (64, 521)), @@ -27,6 +27,14 @@ def test_celo_derive_address(test_name, backend, firmware, show, chaincode, navi NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), NavIns(NavInsID.USE_CASE_STATUS_DISMISS) ] + else: + instructions = [ + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.TOUCH, (76, 463)), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), + NavIns(NavInsID.USE_CASE_STATUS_DISMISS) + ] with celo.derive_address_async(CELO_PACKED_DERIVATION_PATH, show, chaincode): if show: diff --git a/tests/python/test_sign_new_transaction.py b/tests/python/test_sign_new_transaction.py index bee4624..3382e35 100644 --- a/tests/python/test_sign_new_transaction.py +++ b/tests/python/test_sign_new_transaction.py @@ -22,19 +22,30 @@ def sign_transaction_with_rawTx(test_name, backend, navigator, instructions, raw navigator.navigate_and_compare(TESTS_ROOT_DIR, test_name, instructions) response: bytes = get_async_response(backend) + return response.status - assert (response.status == StatusCode.STATUS_OK) - -def test_sign_transaction_eip1559(test_name, backend, firmware, navigator): +def test_sign_transaction_eip1559_no_data(test_name, backend, firmware, navigator): if firmware.device == "nanos": - instructions = get_nano_review_instructions(9) + instructions = get_nano_review_instructions(6) elif firmware.device.startswith("nano"): - instructions = get_nano_review_instructions(5) + instructions = get_nano_review_instructions(4) else: - instructions = get_stax_review_instructions_with_warning(1) + instructions = get_stax_review_instructions(1) + + rawTx = "02f86c82aef380830f42408506fc35fb8082520894da52c9ffebd4d54c94a072776126069d43e74f9e8080c080a099059ce0f1fe1f4fe27a583a6fd6a12274780d358f332d6e5901953900b8fb22a046ce6d625369fdc8a521c22793d188afbf61500cd3095fc09b761b518560f101" + status = sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) + assert(status == StatusCode.STATUS_OK) + +def test_sign_transaction_eip1559_with_data(test_name, backend, firmware): rawTx = "02f8d482a4ec820808839b34b4850fbc63d144830204e094004626a008b1acdc4c74ab51644093b155e59a2380b864ba0876520000000000000000000000000000000000000000000000009458660c5b865f23000000000000000000000000e3b72489968f11c15282514f33df24634440393f000000000000000000000000e3b72489968f11c15282514f33df24634440393fc001a0b0799073a2aa771c5e32b88933ff19982dc30f9e4523fde47137ae504793b880a07014a6e3c32a3b34d4118beb298f2200e858599b5e97766dfaa6fea192cde993" - sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) + celo = CeloClient(backend) + with pytest.raises(Exception) as exc_info: # Expecting the test to fail + with celo.sign_transaction_with_rawTx_async(ETH_PACKED_DERIVATION_PATH, rawTx): + pass + assert "6a80" in str(exc_info.value), "Expected exception to contain '6a80'" + + def test_add_cUSD_as_fee_currency(test_name, backend, navigator): celo = CeloClient(backend) @@ -47,7 +58,6 @@ def test_add_cUSD_as_fee_currency(test_name, backend, navigator): pass response: bytes = get_async_response(backend) - assert (response.status == StatusCode.STATUS_OK) def test_sign_transaction_cip64(test_name, backend, firmware, navigator): @@ -61,4 +71,5 @@ def test_sign_transaction_cip64(test_name, backend, firmware, navigator): instructions = get_stax_review_instructions(1) rawTx = "7bf84382a4ec8084773594008503a11f9db58301688c94da52c9ffebd4d54c94a072776126069d43e74f9e8080c094765DE816845861E75A25FCA122BB6898B8B1282A018080" - sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) \ No newline at end of file + status = sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) + assert(status == StatusCode.STATUS_OK) \ No newline at end of file