diff --git a/.clang-format b/.clang-format index daa53e3..91d2f40 100644 --- a/.clang-format +++ b/.clang-format @@ -19,7 +19,7 @@ SpacesBeforeTrailingComments: 1 SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false -SpacesInSquareBrackets: true +SpacesInSquareBrackets: false UseTab: Never --- Language: Proto diff --git a/Makefile b/Makefile index adc3b9d..f857c66 100755 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ #******************************************************************************* # Ledger App Hedera -# (c) 2019 Hedera Hashgraph +# (c) 2024 Hedera Hashgraph # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,163 +18,91 @@ ifeq ($(BOLOS_SDK),) $(error Environment variable BOLOS_SDK is not set) endif -include $(BOLOS_SDK)/Makefile.defines - -######### -# App # -######### -APP_LOAD_PARAMS = --curve ed25519 -APP_LOAD_PARAMS += --appFlags 0x200 # APPLICATION_FLAG_BOLOS_SETTINGS -APP_LOAD_PARAMS += --path "44'/3030'" -APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS) +include $(BOLOS_SDK)/Makefile.defines -APPVERSION_M = 1 -APPVERSION_N = 4 -APPVERSION_P = 2 -APPVERSION = $(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) +######################################## +# Mandatory configuration # +######################################## +# Application name APPNAME = Hedera -COIN = HBAR - -DEFINES += $(DEFINES_LIB) +# Application version +APPVERSION_M = 1 +APPVERSION_N = 5 +APPVERSION_P = 0 +APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" +# Application source files +APP_SOURCE_PATH += src proto +SDK_SOURCE_PATH += lib_u2f + +# Application icons +ICON_NANOS = icons/nanos_app_hedera.gif +ICON_NANOX = icons/nanox_app_hedera.gif +ICON_NANOSP = icons/nanox_app_hedera.gif +ICON_STAX = icons/stax_app_hedera.gif +ICON_FLEX = icons/flex_app_hedera.gif + +# Application allowed derivation curves. +CURVE_APP_LOAD_PARAMS = ed25519 + +# Application allowed derivation paths. +PATH_APP_LOAD_PARAMS = "44'/3030'" # purpose=coin(44) / coin_type=Hedera HBAR(3030) + +VARIANT_PARAM = COIN +VARIANT_VALUES = hedera + +# Enabling DEBUG flag will enable PRINTF and disable optimizations +#DEBUG = 1 + +######################################## +# Application custom permissions # +######################################## +HAVE_APPLICATION_FLAG_BOLOS_SETTINGS = 1 + +######################################## +# Application communication interfaces # +######################################## +ENABLE_BLUETOOTH = 1 + +######################################## +# NBGL custom features # +######################################## +ENABLE_NBGL_QRCODE = 1 + +######################################## +# 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 + +######################################## +# App specific configuration # +######################################## ifeq ($(TARGET_NAME),TARGET_NANOS) -ICONNAME=icons/nanos_app_hedera.gif -else ifeq ($(TARGET_NAME),TARGET_STAX) -ICONNAME=icons/stax_app_hedera.gif -else -ICONNAME=icons/nanox_app_hedera.gif +DISABLE_STANDARD_BAGL_UX_FLOW = 1 endif - -################ -# Default rule # -################ - -all: default - -############ -# Platform # -############ - -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 += APPVERSION_M=$(APPVERSION_M) APPVERSION_N=$(APPVERSION_N) APPVERSION_P=$(APPVERSION_P) - -# vendor/ledger-nanopb -DFEFINES += PB_FIELD_32BIT=1 - # vendor/printf DEFINES += PRINTF_DISABLE_SUPPORT_FLOAT PRINTF_DISABLE_SUPPORT_EXPONENTIAL PRINTF_DISABLE_SUPPORT_PTRDIFF_T DEFINES += PRINTF_FTOA_BUFFER_SIZE=0 -# endif # U2F DEFINES += HAVE_U2F HAVE_IO_U2F DEFINES += U2F_PROXY_MAGIC=\"BOIL\" -DEFINES += USB_SEGMENT_SIZE=64 -DEFINES += BLE_SEGMENT_SIZE=32 #max MTU, min 20 - -#WEBUSB_URL = www.ledgerwallet.com -#DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=$(shell echo -n $(WEBUSB_URL) | wc -c) WEBUSB_URL=$(shell echo -n $(WEBUSB_URL) | sed -e "s/./\\\'\0\\\',/g") - -DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=0 WEBUSB_URL="" - -DEFINES += APPVERSION=\"$(APPVERSION)\" - - -ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) -DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000 HAVE_BLE_APDU -endif - -ifeq ($(TARGET_NAME),TARGET_NANOS) - DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128 -else - DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300 -endif - -ifeq ($(TARGET_NAME),TARGET_STAX) - DEFINES += NBGL_QRCODE - SDK_SOURCE_PATH += qrcode -else - DEFINES += HAVE_BAGL - ifneq ($(TARGET_NAME),TARGET_NANOS) - DEFINES += HAVE_UX_FLOW - DEFINES += HAVE_GLO096 - DEFINES += BAGL_WIDTH=128 BAGL_HEIGHT=64 - DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature - 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 - -# Enabling debug PRINTF -DEBUG ?= 0 -ifneq ($(DEBUG),0) - ifeq ($(TARGET_NAME),TARGET_NANOS) - DEFINES += HAVE_PRINTF PRINTF=screen_printf - else - DEFINES += HAVE_PRINTF PRINTF=mcu_usb_printf - endif -else - DEFINES += PRINTF\(...\)= -endif - -############## -# Compiler # -############## -ifneq ($(BOLOS_ENV),) -CLANGPATH := $(BOLOS_ENV)/clang-arm-fropi/bin/ -GCCPATH := $(BOLOS_ENV)/gcc-arm-none-eabi-5_3-2016q1/bin/ -endif - -CC := $(CLANGPATH)clang - -CFLAGS += -Og -Iproto - -# nanopb -CFLAGS += -I. - -# printf -# CFLAGS += -Ivendor/printf/ - -# enable color from inside a script -CFLAGS += -fcolor-diagnostics - -AS := $(GCCPATH)arm-none-eabi-gcc - -LD := $(GCCPATH)arm-none-eabi-gcc - -LDFLAGS += -Og -flto=thin -LDLIBS += -lm -lgcc -lc - -# import rules to compile glyphs(/pone) -include $(BOLOS_SDK)/Makefile.glyphs - -### variables processed by the common makefile.rules of the SDK to grab source files and include dirs -APP_SOURCE_PATH += src proto -SDK_SOURCE_PATH += lib_stusb lib_stusb_impl lib_u2f - -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 # Allow usage of function from lib_standard_app/crypto_helpers.c APP_SOURCE_FILES += ${BOLOS_SDK}/lib_standard_app/crypto_helpers.c +# Additional include paths +INCLUDES_PATH += ${BOLOS_SDK}/lib_standard_app $(NANOPB_DIR) . + include vendor/nanopb/extra/nanopb.mk DEFINES += PB_NO_ERRMSG=1 SOURCE_FILES += $(NANOPB_CORE) -CFLAGS += "-I$(NANOPB_DIR)" PB_FILES = $(wildcard proto/*.proto) C_PB_FILES = $(patsubst %.proto,%.pb.c,$(PB_FILES)) @@ -200,27 +128,11 @@ clean_python_pb: cleanall : clean -@rm -rf proto/*.pb.c proto/*.pb.h -load: all - python -m ledgerblue.loadApp $(APP_LOAD_PARAMS) - -load-offline: all - python -m ledgerblue.loadApp $(APP_LOAD_PARAMS) --offline - -delete: - python -m ledgerblue.deleteApp $(COMMON_DELETE_PARAMS) - -# import generic rules from the sdk -include $(BOLOS_SDK)/Makefile.rules - -#add dependency on custom makefile filename -dep/%.d: %.c Makefile - -listvariants: - @echo VARIANTS COIN hedera - check: @ clang-tidy \ $(foreach path, $(APP_SOURCE_PATH), $(shell find $(path) -name "*.c" -and -not -name "pb*" -and -not -name "glyphs*")) -- \ $(CFLAGS) \ $(addprefix -D, $(DEFINES)) \ $(addprefix -I, $(INCLUDES_PATH)) + +include $(BOLOS_SDK)/Makefile.standard_app \ No newline at end of file diff --git a/README.md b/README.md index c4e32bd..9135e3c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Hedera Ledger App -Hedera™ Hashgraph BOLOS application for Ledger Nano S, Nano S Plus, and Nano X. +Hedera™ Hashgraph BOLOS application for Ledger devices. ## Development diff --git a/icons/flex_app_hedera.gif b/icons/flex_app_hedera.gif new file mode 100644 index 0000000..f42d1a0 Binary files /dev/null and b/icons/flex_app_hedera.gif differ diff --git a/ledger_app.toml b/ledger_app.toml index b5d4c3a..eebc955 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 = "./unit-tests/" diff --git a/src/get_app_configuration.c b/src/get_app_configuration.c index e57b040..d2a0308 100644 --- a/src/get_app_configuration.c +++ b/src/get_app_configuration.c @@ -1,6 +1,6 @@ #include -#include "io.h" +#include "app_io.h" #include "os.h" #include "ux.h" @@ -20,12 +20,12 @@ void handle_get_app_configuration( } // storage allowed? - G_io_apdu_buffer[ 0 ] = 0; + G_io_apdu_buffer[0] = 0; // version - G_io_apdu_buffer[ 1 ] = APPVERSION_M; - G_io_apdu_buffer[ 2 ] = APPVERSION_N; - G_io_apdu_buffer[ 3 ] = APPVERSION_P; + G_io_apdu_buffer[1] = MAJOR_VERSION; + G_io_apdu_buffer[2] = MINOR_VERSION; + G_io_apdu_buffer[3] = PATCH_VERSION; io_exchange_with_code(EXCEPTION_OK, 4); } diff --git a/src/get_public_key.c b/src/get_public_key.c index 18d24d2..efd10b2 100644 --- a/src/get_public_key.c +++ b/src/get_public_key.c @@ -17,7 +17,7 @@ static bool get_pk() { // Populate Key Hex String bin2hex(gpk_ctx.full_key, G_io_apdu_buffer, KEY_SIZE); - gpk_ctx.full_key[ KEY_SIZE ] = '\0'; + gpk_ctx.full_key[KEY_SIZE] = '\0'; return true; } @@ -41,11 +41,10 @@ void handle_get_public_key(uint8_t p1, uint8_t p2, uint8_t* buffer, // key frequently Only do UI actions for p1 == 0 if (p1 == 0) { // Complete "Export Public | Key #x?" - hedera_snprintf(gpk_ctx.ui_approve_l2, - DISPLAY_SIZE, + hedera_snprintf(gpk_ctx.ui_approve_l2, DISPLAY_SIZE, #if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_NANOS) "Key #%u?", -#elif defined(TARGET_STAX) +#elif defined(TARGET_STAX) || defined(TARGET_FLEX) "#%u", #endif gpk_ctx.key_index); diff --git a/src/get_public_key.h b/src/get_public_key.h index ec45de9..56ce76c 100644 --- a/src/get_public_key.h +++ b/src/get_public_key.h @@ -4,10 +4,10 @@ #include #include -#include "globals.h" +#include "app_globals.h" #include "handlers.h" #include "hedera.h" -#include "io.h" +#include "app_io.h" #include "ui_common.h" #include "utils.h" @@ -15,14 +15,14 @@ typedef struct get_public_key_context_s { uint32_t key_index; // Lines on the UI Screen - char ui_approve_l2[ DISPLAY_SIZE + 1 ]; + char ui_approve_l2[DISPLAY_SIZE + 1]; - uint8_t raw_pubkey[65]; + uint8_t raw_pubkey[RAW_PUBKEY_SIZE]; // Public Key Compare uint8_t display_index; - uint8_t full_key[ KEY_SIZE + 1 ]; - uint8_t partial_key[ DISPLAY_SIZE + 1 ]; + uint8_t full_key[KEY_SIZE + 1]; + uint8_t partial_key[DISPLAY_SIZE + 1]; } get_public_key_context_t; extern get_public_key_context_t gpk_ctx; diff --git a/src/hedera.c b/src/hedera.c index 3703371..fb4c730 100644 --- a/src/hedera.c +++ b/src/hedera.c @@ -4,33 +4,25 @@ #include #include -#include "lib_standard_app/crypto_helpers.h" - -#include "globals.h" +#include "crypto_helpers.h" #include "utils.h" static void hedera_set_path(uint32_t index, uint32_t path[static 5]) { - path[ 0 ] = PATH_ZERO; - path[ 1 ] = PATH_ONE; - path[ 2 ] = PATH_TWO; - path[ 3 ] = PATH_THREE; - path[ 4 ] = PATH_FOUR; + path[0] = PATH_ZERO; + path[1] = PATH_ONE; + path[2] = PATH_TWO; + path[3] = PATH_THREE; + path[4] = PATH_FOUR; } -bool hedera_get_pubkey(uint32_t index, uint8_t raw_pubkey[static 65]) { - static uint32_t path[ 5 ]; +bool hedera_get_pubkey(uint32_t index, uint8_t raw_pubkey[static RAW_PUBKEY_SIZE]) { + static uint32_t path[5]; hedera_set_path(index, path); - if (CX_OK != bip32_derive_with_seed_get_pubkey_256(HDW_ED25519_SLIP10, - CX_CURVE_Ed25519, - path, - 5, - raw_pubkey, - NULL, - CX_SHA512, - NULL, - 0)) { + if (CX_OK != bip32_derive_with_seed_get_pubkey_256( + HDW_ED25519_SLIP10, CX_CURVE_Ed25519, path, 5, raw_pubkey, + NULL, CX_SHA512, NULL, 0)) { return false; } @@ -39,24 +31,17 @@ bool hedera_get_pubkey(uint32_t index, uint8_t raw_pubkey[static 65]) { bool hedera_sign(uint32_t index, const uint8_t* tx, uint8_t tx_len, /* out */ uint8_t* result) { - - static uint32_t path[ 5 ]; + static uint32_t path[5]; size_t sig_len = 64; hedera_set_path(index, path); - - if (CX_OK != bip32_derive_with_seed_eddsa_sign_hash_256(HDW_ED25519_SLIP10, - CX_CURVE_Ed25519, - path, - 5, - CX_SHA512, - tx, // hash (really message) - tx_len, // hash length (really message length) - result, // signature - &sig_len, - NULL, - 0)) { + if (CX_OK != bip32_derive_with_seed_eddsa_sign_hash_256( + HDW_ED25519_SLIP10, CX_CURVE_Ed25519, path, 5, CX_SHA512, + tx, // hash (really message) + tx_len, // hash length (really message length) + result, // signature + &sig_len, NULL, 0)) { return false; } diff --git a/src/hedera.h b/src/hedera.h index ae7d1ed..730fbb1 100644 --- a/src/hedera.h +++ b/src/hedera.h @@ -2,8 +2,9 @@ #include #include +#include "app_globals.h" -bool hedera_get_pubkey(uint32_t index, uint8_t raw_pubkey[static 65]); +bool hedera_get_pubkey(uint32_t index, uint8_t raw_pubkey[static RAW_PUBKEY_SIZE]); bool hedera_sign(uint32_t index, const uint8_t* tx, uint8_t tx_len, /* out */ uint8_t* result); diff --git a/src/hedera_format.c b/src/hedera_format.c index 3f5b773..9d94c1b 100644 --- a/src/hedera_format.c +++ b/src/hedera_format.c @@ -3,7 +3,7 @@ #define BUF_SIZE 32 static char *hedera_format_amount(uint64_t amount, uint8_t decimals) { - static char buf[ BUF_SIZE ]; + static char buf[BUF_SIZE]; // NOTE: format of amounts are not sensitive memset(buf, 0, BUF_SIZE); @@ -11,8 +11,8 @@ static char *hedera_format_amount(uint64_t amount, uint8_t decimals) { // Quick shortcut if the amount is zero // Regardless of decimals, the output is always "0" if (amount == 0) { - buf[ 0 ] = '0'; - buf[ 1 ] = '\0'; + buf[0] = '0'; + buf[1] = '\0'; return buf; } @@ -27,15 +27,15 @@ static char *hedera_format_amount(uint64_t amount, uint8_t decimals) { int digit = amount % 10; amount /= 10; - buf[ i++ ] = '0' + digit; + buf[i++] = '0' + digit; if (i == decimals) { - buf[ i++ ] = '.'; + buf[i++] = '.'; } } - if (buf[ i - 1 ] == '.') { - buf[ i++ ] = '0'; + if (buf[i - 1] == '.') { + buf[i++] = '0'; } int size = i; @@ -45,17 +45,17 @@ static char *hedera_format_amount(uint64_t amount, uint8_t decimals) { while (j < i) { i -= 1; - tmp = buf[ j ]; - buf[ j ] = buf[ i ]; - buf[ i ] = tmp; + tmp = buf[j]; + buf[j] = buf[i]; + buf[i] = tmp; j += 1; } for (j = size - 1; j > 0; j--) { - if (buf[ j ] == '0') { + if (buf[j] == '0') { continue; - } else if (buf[ j ] == '.') { + } else if (buf[j] == '.') { break; } else { j += 1; @@ -64,7 +64,7 @@ static char *hedera_format_amount(uint64_t amount, uint8_t decimals) { } if (j < size - 1) { - buf[ j ] = '\0'; + buf[j] = '\0'; } return buf; @@ -81,7 +81,7 @@ static void validate_decimals(uint32_t decimals) { } } -static void validate_memo(const char memo[ 100 ]) { +static void validate_memo(const char memo[100]) { if (strlen(memo) > MAX_MEMO_SIZE) { // Hedera max length for memos THROW(EXCEPTION_MALFORMED_APDU); @@ -92,15 +92,13 @@ static void validate_memo(const char memo[ 100 ]) { hedera_snprintf(element, sizeof(element) - 1, __VA_ARGS__) void reformat_key(void) { - hedera_safe_printf( - st_ctx.summary_line_2, + hedera_safe_printf(st_ctx.summary_line_2, #if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_NANOS) - "with Key #%u?", -#elif defined(TARGET_STAX) - "#%u", + "with Key #%u?", +#elif defined(TARGET_STAX) || defined(TARGET_FLEX) + "#%u", #endif - st_ctx.key_index - ); + st_ctx.key_index); } // SUMMARIES @@ -113,14 +111,12 @@ void reformat_summary_send_token(void) { hedera_safe_printf( #if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_NANOS) st_ctx.summary_line_1, "Send %llu.%llu.%llu", -#elif defined(TARGET_STAX) +#elif defined(TARGET_STAX) || defined(TARGET_FLEX) st_ctx.summary_line_1, "Send Token %llu.%llu.%llu", #endif - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .token.shardNum, - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .token.realmNum, - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0].token.shardNum, + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0].token.realmNum, + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] .token.tokenNum); } @@ -136,7 +132,7 @@ static void set_title(const char *title) { static void set_senders_title(const char *title) { #if defined(TARGET_NANOS) set_title(title); -#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#else // st_ctx.senders_title --> st_ctx.title (NANOS) hedera_safe_printf(st_ctx.senders_title, "%s", title); #endif @@ -145,7 +141,7 @@ static void set_senders_title(const char *title) { static void set_recipients_title(const char *title) { #if defined(TARGET_NANOS) set_title(title); -#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#else // st_ctx.recipients_title --> st_ctx.title (NANOS) hedera_safe_printf(st_ctx.recipients_title, "%s", title); #endif @@ -154,7 +150,7 @@ static void set_recipients_title(const char *title) { static void set_amount_title(const char *title) { #if defined(TARGET_NANOS) set_title(title); -#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#else // st_ctx.senders_title --> st_ctx.title (NANOS) hedera_safe_printf(st_ctx.amount_title, "%s", title); #endif @@ -226,9 +222,9 @@ void reformat_token_associate(void) { // st_ctx.senders --> st_ctx.full (NANOS) hedera_safe_printf( st_ctx.senders, "%llu.%llu.%llu", - st_ctx.transaction.data.tokenAssociate.tokens[ 0 ].shardNum, - st_ctx.transaction.data.tokenAssociate.tokens[ 0 ].realmNum, - st_ctx.transaction.data.tokenAssociate.tokens[ 0 ].tokenNum); + st_ctx.transaction.data.tokenAssociate.tokens[0].shardNum, + st_ctx.transaction.data.tokenAssociate.tokens[0].realmNum, + st_ctx.transaction.data.tokenAssociate.tokens[0].tokenNum); } void reformat_token_dissociate(void) { @@ -237,9 +233,9 @@ void reformat_token_dissociate(void) { // st_ctx.senders --> st_ctx.full (NANOS) hedera_safe_printf( st_ctx.senders, "%llu.%llu.%llu", - st_ctx.transaction.data.tokenDissociate.tokens[ 0 ].shardNum, - st_ctx.transaction.data.tokenDissociate.tokens[ 0 ].realmNum, - st_ctx.transaction.data.tokenDissociate.tokens[ 0 ].tokenNum); + st_ctx.transaction.data.tokenDissociate.tokens[0].shardNum, + st_ctx.transaction.data.tokenDissociate.tokens[0].realmNum, + st_ctx.transaction.data.tokenDissociate.tokens[0].tokenNum); } void reformat_token_mint(void) { @@ -268,11 +264,11 @@ void reformat_verify_account() { // st_ctx.senders --> st_ctx.full (NANOS) hedera_safe_printf( st_ctx.senders, "%llu.%llu.%llu", - st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[ 0 ] + st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[0] .accountID.shardNum, - st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[ 0 ] + st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[0] .accountID.realmNum, - st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[ 0 ] + st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[0] .accountID.account); } @@ -282,13 +278,13 @@ void reformat_sender_account(void) { // st_ctx.senders --> st_ctx.full (NANOS) hedera_safe_printf(st_ctx.senders, "%llu.%llu.%llu", st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ st_ctx.transfer_from_index ] + .accountAmounts[st_ctx.transfer_from_index] .accountID.shardNum, st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ st_ctx.transfer_from_index ] + .accountAmounts[st_ctx.transfer_from_index] .accountID.realmNum, st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ st_ctx.transfer_from_index ] + .accountAmounts[st_ctx.transfer_from_index] .accountID.account); } @@ -296,17 +292,16 @@ void reformat_token_sender_account(void) { set_senders_title("Sender"); // st_ctx.senders --> st_ctx.full (NANOS) - hedera_safe_printf( - st_ctx.senders, "%llu.%llu.%llu", - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ st_ctx.transfer_from_index ] - .accountID.shardNum, - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ st_ctx.transfer_from_index ] - .accountID.realmNum, - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ st_ctx.transfer_from_index ] - .accountID.account); + hedera_safe_printf(st_ctx.senders, "%llu.%llu.%llu", + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[st_ctx.transfer_from_index] + .accountID.shardNum, + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[st_ctx.transfer_from_index] + .accountID.realmNum, + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[st_ctx.transfer_from_index] + .accountID.account); } // RECIPIENTS @@ -340,13 +335,13 @@ void reformat_recipient_account(void) { // st_ctx.recipients --> st_ctx.full (NANOS) hedera_safe_printf(st_ctx.recipients, "%llu.%llu.%llu", st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ st_ctx.transfer_to_index ] + .accountAmounts[st_ctx.transfer_to_index] .accountID.shardNum, st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ st_ctx.transfer_to_index ] + .accountAmounts[st_ctx.transfer_to_index] .accountID.realmNum, st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ st_ctx.transfer_to_index ] + .accountAmounts[st_ctx.transfer_to_index] .accountID.account); } @@ -354,17 +349,16 @@ void reformat_token_recipient_account(void) { set_recipients_title("Recipient"); // st_ctx.recipients --> st_ctx.full (NANOS) - hedera_safe_printf( - st_ctx.recipients, "%llu.%llu.%llu", - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ st_ctx.transfer_to_index ] - .accountID.shardNum, - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ st_ctx.transfer_to_index ] - .accountID.realmNum, - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ st_ctx.transfer_to_index ] - .accountID.account); + hedera_safe_printf(st_ctx.recipients, "%llu.%llu.%llu", + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[st_ctx.transfer_to_index] + .accountID.shardNum, + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[st_ctx.transfer_to_index] + .accountID.realmNum, + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[st_ctx.transfer_to_index] + .accountID.account); } // AMOUNTS @@ -407,7 +401,7 @@ void reformat_amount_transfer(void) { hedera_safe_printf( st_ctx.amount, "%s hbar", hedera_format_tinybar(st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ st_ctx.transfer_to_index ] + .accountAmounts[st_ctx.transfer_to_index] .amount)); } @@ -432,7 +426,7 @@ void reformat_amount_mint(void) { } void reformat_token_transfer(void) { - validate_decimals(st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] + validate_decimals(st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] .expected_decimals.value); set_amount_title("Amount"); @@ -440,10 +434,10 @@ void reformat_token_transfer(void) { hedera_safe_printf( st_ctx.amount, "%s", hedera_format_amount( - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ st_ctx.transfer_to_index ] + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[st_ctx.transfer_to_index] .amount, - st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] + st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] .expected_decimals.value)); } @@ -471,5 +465,5 @@ void reformat_memo(void) { // st_ctx.memo --> st_ctx.full (NANOS) hedera_safe_printf( st_ctx.memo, "%s", - (st_ctx.transaction.memo[ 0 ] != '\0') ? st_ctx.transaction.memo : ""); + (st_ctx.transaction.memo[0] != '\0') ? st_ctx.transaction.memo : ""); } diff --git a/src/hedera_format.h b/src/hedera_format.h index 12c4b68..5484315 100644 --- a/src/hedera_format.h +++ b/src/hedera_format.h @@ -1,6 +1,6 @@ #pragma once -#include "globals.h" -#include "io.h" +#include "app_globals.h" +#include "app_io.h" #include "sign_transaction.h" void reformat_key(void); diff --git a/src/main.c b/src/main.c index ac0f68f..4218c53 100644 --- a/src/main.c +++ b/src/main.c @@ -1,8 +1,9 @@ -#include "ux.h" +#include "app_globals.h" #include "glyphs.h" -#include "globals.h" #include "handlers.h" +#include "os.h" #include "ui_common.h" +#include "ux.h" // This is the main loop that reads and writes APDUs. It receives request // APDUs from the computer, looks up the corresponding command handler, and @@ -15,7 +16,7 @@ // Things are marked volatile throughout the app to prevent unintended compiler // reording of instructions (since the try-catch system is a macro) -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) ux_state_t G_ux; bolos_ux_params_t G_ux_params; #endif @@ -42,36 +43,36 @@ void app_main() { } // malformed APDU - if (G_io_apdu_buffer[ OFFSET_CLA ] != CLA) { + if (G_io_apdu_buffer[OFFSET_CLA] != CLA) { THROW(EXCEPTION_MALFORMED_APDU); } // APDU handler functions defined in handlers - switch (G_io_apdu_buffer[ OFFSET_INS ]) { + switch (G_io_apdu_buffer[OFFSET_INS]) { case INS_GET_APP_CONFIGURATION: // handlers -> get_app_configuration handle_get_app_configuration( - G_io_apdu_buffer[ OFFSET_P1 ], - G_io_apdu_buffer[ OFFSET_P2 ], + G_io_apdu_buffer[OFFSET_P1], + G_io_apdu_buffer[OFFSET_P2], G_io_apdu_buffer + OFFSET_CDATA, - G_io_apdu_buffer[ OFFSET_LC ], &flags, &tx); + G_io_apdu_buffer[OFFSET_LC], &flags, &tx); break; case INS_GET_PUBLIC_KEY: // handlers -> get_public_key - handle_get_public_key(G_io_apdu_buffer[ OFFSET_P1 ], - G_io_apdu_buffer[ OFFSET_P2 ], + handle_get_public_key(G_io_apdu_buffer[OFFSET_P1], + G_io_apdu_buffer[OFFSET_P2], G_io_apdu_buffer + OFFSET_CDATA, - G_io_apdu_buffer[ OFFSET_LC ], + G_io_apdu_buffer[OFFSET_LC], &flags, &tx); break; case INS_SIGN_TRANSACTION: // handlers -> sign_transaction - handle_sign_transaction(G_io_apdu_buffer[ OFFSET_P1 ], - G_io_apdu_buffer[ OFFSET_P2 ], + handle_sign_transaction(G_io_apdu_buffer[OFFSET_P1], + G_io_apdu_buffer[OFFSET_P2], G_io_apdu_buffer + OFFSET_CDATA, - G_io_apdu_buffer[ OFFSET_LC ], + G_io_apdu_buffer[OFFSET_LC], &flags, &tx); break; @@ -93,8 +94,8 @@ void app_main() { break; } - G_io_apdu_buffer[ tx++ ] = sw >> 8; - G_io_apdu_buffer[ tx++ ] = sw & 0xff; + G_io_apdu_buffer[tx++] = sw >> 8; + G_io_apdu_buffer[tx++] = sw & 0xff; } FINALLY { // explicitly do nothing diff --git a/src/printf.c b/src/printf.c index ca9b51c..4639cc2 100644 --- a/src/printf.c +++ b/src/printf.c @@ -129,7 +129,7 @@ typedef struct { static inline void _out_buffer(char character, void* buffer, size_t idx, size_t maxlen) { if (idx < maxlen) { - ((char*)buffer)[ idx ] = character; + ((char*)buffer)[idx] = character; } } @@ -203,7 +203,7 @@ static size_t _out_rev(out_fct_type out, char* buffer, size_t idx, // reverse string while (len) { - out(buf[ --len ], buffer, idx++, maxlen); + out(buf[--len], buffer, idx++, maxlen); } // append pad spaces up to given width @@ -228,11 +228,11 @@ static size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, width--; } while ((len < prec) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - buf[ len++ ] = '0'; + buf[len++] = '0'; } while ((flags & FLAGS_ZEROPAD) && (len < width) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - buf[ len++ ] = '0'; + buf[len++] = '0'; } } @@ -247,25 +247,25 @@ static size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, } if ((base == 16U) && !(flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - buf[ len++ ] = 'x'; + buf[len++] = 'x'; } else if ((base == 16U) && (flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - buf[ len++ ] = 'X'; + buf[len++] = 'X'; } else if ((base == 2U) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - buf[ len++ ] = 'b'; + buf[len++] = 'b'; } if (len < PRINTF_NTOA_BUFFER_SIZE) { - buf[ len++ ] = '0'; + buf[len++] = '0'; } } if (len < PRINTF_NTOA_BUFFER_SIZE) { if (negative) { - buf[ len++ ] = '-'; + buf[len++] = '-'; } else if (flags & FLAGS_PLUS) { - buf[ len++ ] = '+'; // ignore the space if the '+' exists + buf[len++] = '+'; // ignore the space if the '+' exists } else if (flags & FLAGS_SPACE) { - buf[ len++ ] = ' '; + buf[len++] = ' '; } } @@ -277,7 +277,7 @@ static size_t _ntoa_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, unsigned long value, bool negative, unsigned long base, unsigned int prec, unsigned int width, unsigned int flags) { - char buf[ PRINTF_NTOA_BUFFER_SIZE ]; + char buf[PRINTF_NTOA_BUFFER_SIZE]; size_t len = 0U; // no hash for 0 values @@ -289,7 +289,7 @@ static size_t _ntoa_long(out_fct_type out, char* buffer, size_t idx, if (!(flags & FLAGS_PRECISION) || value) { do { const char digit = (char)(value % base); - buf[ len++ ] = + buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; value /= base; @@ -307,7 +307,7 @@ static size_t _ntoa_long_long(out_fct_type out, char* buffer, size_t idx, bool negative, unsigned long long base, unsigned int prec, unsigned int width, unsigned int flags) { - char buf[ PRINTF_NTOA_BUFFER_SIZE ]; + char buf[PRINTF_NTOA_BUFFER_SIZE]; size_t len = 0U; // no hash for 0 values @@ -319,7 +319,7 @@ static size_t _ntoa_long_long(out_fct_type out, char* buffer, size_t idx, if (!(flags & FLAGS_PRECISION) || value) { do { const char digit = (char)(value % base); - buf[ len++ ] = + buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; value /= base; @@ -345,7 +345,7 @@ static size_t _etoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, double value, unsigned int prec, unsigned int width, unsigned int flags) { - char buf[ PRINTF_FTOA_BUFFER_SIZE ]; + char buf[PRINTF_FTOA_BUFFER_SIZE]; size_t len = 0U; double diff = 0.0; @@ -388,19 +388,19 @@ static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, } // limit precision to 9, cause a prec >= 10 can lead to overflow errors while ((len < PRINTF_FTOA_BUFFER_SIZE) && (prec > 9U)) { - buf[ len++ ] = '0'; + buf[len++] = '0'; prec--; } int whole = (int)value; - double tmp = (value - whole) * pow10[ prec ]; + double tmp = (value - whole) * pow10[prec]; unsigned long frac = (unsigned long)tmp; diff = tmp - frac; if (diff > 0.5) { ++frac; // handle rollover, e.g. case 0.99 with prec 1 is 1.0 - if (frac >= pow10[ prec ]) { + if (frac >= pow10[prec]) { frac = 0; ++whole; } @@ -422,24 +422,24 @@ static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, // now do fractional part, as an unsigned number while (len < PRINTF_FTOA_BUFFER_SIZE) { --count; - buf[ len++ ] = (char)(48U + (frac % 10U)); + buf[len++] = (char)(48U + (frac % 10U)); if (!(frac /= 10U)) { break; } } // add extra 0s while ((len < PRINTF_FTOA_BUFFER_SIZE) && (count-- > 0U)) { - buf[ len++ ] = '0'; + buf[len++] = '0'; } if (len < PRINTF_FTOA_BUFFER_SIZE) { // add decimal - buf[ len++ ] = '.'; + buf[len++] = '.'; } } // do whole part, number is reversed while (len < PRINTF_FTOA_BUFFER_SIZE) { - buf[ len++ ] = (char)(48 + (whole % 10)); + buf[len++] = (char)(48 + (whole % 10)); if (!(whole /= 10)) { break; } @@ -451,17 +451,17 @@ static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, width--; } while ((len < width) && (len < PRINTF_FTOA_BUFFER_SIZE)) { - buf[ len++ ] = '0'; + buf[len++] = '0'; } } if (len < PRINTF_FTOA_BUFFER_SIZE) { if (negative) { - buf[ len++ ] = '-'; + buf[len++] = '-'; } else if (flags & FLAGS_PLUS) { - buf[ len++ ] = '+'; // ignore the space if the '+' exists + buf[len++] = '+'; // ignore the space if the '+' exists } else if (flags & FLAGS_SPACE) { - buf[ len++ ] = ' '; + buf[len++] = ' '; } } @@ -769,10 +769,9 @@ static int _hedera_vsnprintf(out_fct_type out, char* buffer, (unsigned long)(value > 0 ? value : 0 - value), value < 0, base, precision, width, flags); } else { - const int value = (flags & FLAGS_CHAR) - ? (char)va_arg(va, int) - : (flags & FLAGS_SHORT) - ? (short int)va_arg(va, int) + const int value = + (flags & FLAGS_CHAR) ? (char)va_arg(va, int) + : (flags & FLAGS_SHORT) ? (short int)va_arg(va, int) : va_arg(va, int); idx = _ntoa_long( out, buffer, idx, maxlen, @@ -796,10 +795,9 @@ static int _hedera_vsnprintf(out_fct_type out, char* buffer, const unsigned int value = (flags & FLAGS_CHAR) ? (unsigned char)va_arg(va, unsigned int) - : (flags & FLAGS_SHORT) - ? (unsigned short int)va_arg(va, - unsigned int) - : va_arg(va, unsigned int); + : (flags & FLAGS_SHORT) + ? (unsigned short int)va_arg(va, unsigned int) + : va_arg(va, unsigned int); idx = _ntoa_long(out, buffer, idx, maxlen, value, false, base, precision, width, flags); } @@ -924,7 +922,7 @@ static int _hedera_vsnprintf(out_fct_type out, char* buffer, int hedera_printf_(const char* format, ...) { va_list va; va_start(va, format); - char buffer[ 1 ]; + char buffer[1]; const int ret = _hedera_vsnprintf(_out_char, buffer, (size_t)-1, format, va); va_end(va); @@ -949,7 +947,7 @@ int hedera_snprintf_(char* buffer, size_t count, const char* format, ...) { } int hedera_vprintf_(const char* format, va_list va) { - char buffer[ 1 ]; + char buffer[1]; return _hedera_vsnprintf(_out_char, buffer, (size_t)-1, format, va); } diff --git a/src/sign_transaction.c b/src/sign_transaction.c index 7cb643f..9139235 100644 --- a/src/sign_transaction.c +++ b/src/sign_transaction.c @@ -25,7 +25,7 @@ static void validate_transfer(void) { } if (st_ctx.transaction.data.cryptoTransfer.tokenTransfers_count == 1) { - if (st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] + if (st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] .transfers_count != 2) { // More than two accounts in a token transfer THROW(EXCEPTION_MALFORMED_APDU); @@ -43,7 +43,7 @@ static void validate_transfer(void) { static bool is_verify_account(void) { // Only 1 Account (Sender), Fee 1 Tinybar, and Value 0 Tinybar return ( - st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[ 0 ] + st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts[0] .amount == 0 && st_ctx.transaction.data.cryptoTransfer.transfers.accountAmounts_count == 1 && @@ -67,7 +67,7 @@ void handle_transaction_body() { #if defined(TARGET_NANOS) MEMCLEAR(st_ctx.full); MEMCLEAR(st_ctx.partial); -#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#else MEMCLEAR(st_ctx.amount_title); MEMCLEAR(st_ctx.senders_title); MEMCLEAR(st_ctx.operator); @@ -90,7 +90,7 @@ void handle_transaction_body() { // with Key #X? reformat_key(); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) // All flows except Verify if (!is_verify_account()) reformat_operator(); #endif @@ -101,7 +101,7 @@ void handle_transaction_body() { st_ctx.type = Create; reformat_summary("Create Account"); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_stake_target(); reformat_collect_rewards(); reformat_amount_balance(); @@ -112,7 +112,7 @@ void handle_transaction_body() { st_ctx.type = Update; reformat_summary("Update Account"); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_stake_target(); reformat_collect_rewards(); reformat_updated_account(); @@ -123,7 +123,7 @@ void handle_transaction_body() { st_ctx.type = Associate; reformat_summary("Associate Token"); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_token_associate(); #endif break; @@ -132,7 +132,7 @@ void handle_transaction_body() { st_ctx.type = Dissociate; reformat_summary("Dissociate Token"); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_token_dissociate(); #endif break; @@ -141,7 +141,7 @@ void handle_transaction_body() { st_ctx.type = TokenBurn; reformat_summary("Burn Token"); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_token_burn(); reformat_amount_burn(); #endif @@ -151,7 +151,7 @@ void handle_transaction_body() { st_ctx.type = TokenMint; reformat_summary("Mint Token"); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_token_mint(); reformat_amount_mint(); #endif @@ -164,7 +164,7 @@ void handle_transaction_body() { st_ctx.type = Verify; reformat_summary("Verify Account"); -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_verify_account(); #endif @@ -177,13 +177,13 @@ void handle_transaction_body() { st_ctx.transfer_from_index = 0; st_ctx.transfer_to_index = 1; if (st_ctx.transaction.data.cryptoTransfer.transfers - .accountAmounts[ 0 ] + .accountAmounts[0] .amount > 0) { st_ctx.transfer_from_index = 1; st_ctx.transfer_to_index = 0; } -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_sender_account(); reformat_recipient_account(); reformat_amount_transfer(); @@ -196,14 +196,14 @@ void handle_transaction_body() { // Determine Sender based on amount st_ctx.transfer_from_index = 0; st_ctx.transfer_to_index = 1; - if (st_ctx.transaction.data.cryptoTransfer.tokenTransfers[ 0 ] - .transfers[ 0 ] + if (st_ctx.transaction.data.cryptoTransfer.tokenTransfers[0] + .transfers[0] .amount > 0) { st_ctx.transfer_from_index = 1; st_ctx.transfer_to_index = 0; } -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) reformat_token_sender_account(); reformat_token_recipient_account(); reformat_token_transfer(); @@ -221,7 +221,7 @@ void handle_transaction_body() { break; } -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if !defined(TARGET_NANOS) // All flows except Verify if (!is_verify_account()) { reformat_fee(); @@ -243,15 +243,12 @@ void handle_sign_transaction(uint8_t p1, uint8_t p2, uint8_t* buffer, UNUSED(tx); // Raw Tx - uint8_t raw_transaction[ MAX_TX_SIZE ]; + uint8_t raw_transaction[MAX_TX_SIZE]; int raw_transaction_length = len - 4; // Oops Oof Owie - if ( - raw_transaction_length > MAX_TX_SIZE || - raw_transaction_length > (int) buffer - 4 || - buffer == NULL - ) { + if (raw_transaction_length > MAX_TX_SIZE || + raw_transaction_length > (int)buffer - 4 || buffer == NULL) { THROW(EXCEPTION_MALFORMED_APDU); } diff --git a/src/sign_transaction.h b/src/sign_transaction.h index ae06273..869f64b 100644 --- a/src/sign_transaction.h +++ b/src/sign_transaction.h @@ -11,7 +11,7 @@ #include "handlers.h" #include "hedera.h" #include "hedera_format.h" -#include "io.h" +#include "app_io.h" #include "transaction_body.pb.h" #include "ui_common.h" #include "utils.h" @@ -90,21 +90,21 @@ typedef struct sign_tx_context_s { uint8_t transfer_from_index; // Transaction Summary - char summary_line_1[ DISPLAY_SIZE + 1 ]; - char summary_line_2[ DISPLAY_SIZE + 1 ]; + char summary_line_1[DISPLAY_SIZE + 1]; + char summary_line_2[DISPLAY_SIZE + 1]; #if defined(TARGET_NANOS) union { #define TITLE_SIZE (DISPLAY_SIZE + 1) - char title[ TITLE_SIZE ]; - char senders_title[ TITLE_SIZE ]; // alias for title - char recipients_title[ TITLE_SIZE ]; // alias for title - char amount_title[ TITLE_SIZE ]; // alias for title + char title[TITLE_SIZE]; + char senders_title[TITLE_SIZE]; // alias for title + char recipients_title[TITLE_SIZE]; // alias for title + char amount_title[TITLE_SIZE]; // alias for title }; -#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) - char senders_title[ DISPLAY_SIZE + 1 ]; - char recipients_title[ DISPLAY_SIZE + 1 ]; - char amount_title[ DISPLAY_SIZE + 1 ]; +#else + char senders_title[DISPLAY_SIZE + 1]; + char recipients_title[DISPLAY_SIZE + 1]; + char amount_title[DISPLAY_SIZE + 1]; #endif // Account ID: uint64_t.uint64_t.uint64_t @@ -112,15 +112,15 @@ typedef struct sign_tx_context_s { #if defined(TARGET_NANOS) union { #define FULL_SIZE (ACCOUNT_ID_SIZE + 1) - char full[ FULL_SIZE ]; - char operator[ FULL_SIZE ]; // alias for full - char senders[ FULL_SIZE ]; // alias for full - char recipients[ FULL_SIZE ]; // alias for full - char amount[ FULL_SIZE ]; // alias for full - char fee[ FULL_SIZE ]; // alias for full - char memo[ FULL_SIZE ]; // alias for full + char full[FULL_SIZE]; + char operator[FULL_SIZE]; // alias for full + char senders[FULL_SIZE]; // alias for full + char recipients[FULL_SIZE]; // alias for full + char amount[FULL_SIZE]; // alias for full + char fee[FULL_SIZE]; // alias for full + char memo[FULL_SIZE]; // alias for full }; - char partial[ DISPLAY_SIZE + 1 ]; + char partial[DISPLAY_SIZE + 1]; #endif // Steps correspond to parts of the transaction proto @@ -133,24 +133,24 @@ typedef struct sign_tx_context_s { #if defined(TARGET_NANOS) uint8_t display_index; // 1 -> Number Screens uint8_t display_count; // Number Screens -#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#else // Transaction Operator - char operator[ DISPLAY_SIZE * 2 + 1 ]; + char operator[DISPLAY_SIZE * 2 + 1]; // Transaction Senders - char senders[ DISPLAY_SIZE * 2 + 1 ]; + char senders[DISPLAY_SIZE * 2 + 1]; // Transaction Recipients - char recipients[ DISPLAY_SIZE * 2 + 1 ]; + char recipients[DISPLAY_SIZE * 2 + 1]; // Transaction Amount - char amount[ DISPLAY_SIZE * 2 + 1 ]; + char amount[DISPLAY_SIZE * 2 + 1]; // Transaction Fee - char fee[ DISPLAY_SIZE * 2 + 1 ]; + char fee[DISPLAY_SIZE * 2 + 1]; // Transaction Memo - char memo[ MAX_MEMO_SIZE + 1 ]; + char memo[MAX_MEMO_SIZE + 1]; #endif // Parsed transaction diff --git a/src/ui/globals.h b/src/ui/app_globals.h similarity index 97% rename from src/ui/globals.h rename to src/ui/app_globals.h index 750f433..2861579 100644 --- a/src/ui/globals.h +++ b/src/ui/app_globals.h @@ -5,6 +5,7 @@ #define BIP32_PATH 5 #define DISPLAY_SIZE 18 // characters @ 11pt sys font +#define RAW_PUBKEY_SIZE 65 #define MAX_TX_SIZE 512 #define FULL_ADDRESS_LENGTH 54 #define ACCOUNT_ID_SIZE 19 * 3 + 2 + 1 diff --git a/src/ui/io.h b/src/ui/app_io.h similarity index 85% rename from src/ui/io.h rename to src/ui/app_io.h index 8c073f0..9216513 100644 --- a/src/ui/io.h +++ b/src/ui/app_io.h @@ -1,7 +1,7 @@ #pragma once #include "debug.h" -#include "globals.h" +#include "app_globals.h" #include "os.h" #include "os_io_seproxyhal.h" diff --git a/src/ui/io.c b/src/ui/io.c index fba1a76..805ccfa 100644 --- a/src/ui/io.c +++ b/src/ui/io.c @@ -1,22 +1,23 @@ -#include "io.h" +#include "app_io.h" + #include "ux.h" #ifdef HAVE_NBGL #include "nbgl_touch.h" -#endif // HAVE_NBGL +#endif // HAVE_NBGL // Everything below this point is Ledger magic. And the magic isn't well- // documented, so if you want to understand it, you'll need to read the // source, which you can find in the sdk repo for your device. // Fortunately, we are not meant to understand this. -unsigned char G_io_seproxyhal_spi_buffer[ IO_SEPROXYHAL_BUFFER_SIZE_B ]; +unsigned char G_io_seproxyhal_spi_buffer[IO_SEPROXYHAL_BUFFER_SIZE_B]; #ifdef HAVE_BAGL void io_seproxyhal_display(const bagl_element_t *element) { io_seproxyhal_display_default(element); } -#endif //HAVE_BAGL +#endif // HAVE_BAGL uint8_t io_event(uint8_t channel) { UNUSED(channel); @@ -28,11 +29,11 @@ uint8_t io_event(uint8_t channel) { case SEPROXYHAL_TAG_BUTTON_PUSH_EVENT: #ifdef HAVE_BAGL UX_BUTTON_PUSH_EVENT(G_io_seproxyhal_spi_buffer); -#endif // HAVE_BAGL +#endif // HAVE_BAGL break; case SEPROXYHAL_TAG_STATUS_EVENT: - if (G_io_apdu_media == IO_APDU_MEDIA_USB_HID && // - !(U4BE(G_io_seproxyhal_spi_buffer, 3) & // + if (G_io_apdu_media == IO_APDU_MEDIA_USB_HID && // + !(U4BE(G_io_seproxyhal_spi_buffer, 3) & // SEPROXYHAL_TAG_STATUS_EVENT_FLAG_USB_POWERED)) { THROW(EXCEPTION_IO_RESET); } @@ -41,16 +42,16 @@ uint8_t io_event(uint8_t channel) { case SEPROXYHAL_TAG_DISPLAY_PROCESSED_EVENT: #ifdef HAVE_BAGL UX_DISPLAYED_EVENT({}); -#endif // HAVE_BAGL +#endif // HAVE_BAGL #ifdef HAVE_NBGL UX_DEFAULT_EVENT(); -#endif // HAVE_NBGL +#endif // HAVE_NBGL break; #ifdef HAVE_NBGL case SEPROXYHAL_TAG_FINGER_EVENT: UX_FINGER_EVENT(G_io_seproxyhal_spi_buffer); break; -#endif // HAVE_NBGL +#endif // HAVE_NBGL case SEPROXYHAL_TAG_TICKER_EVENT: UX_TICKER_EVENT(G_io_seproxyhal_spi_buffer, {}); break; @@ -95,8 +96,8 @@ unsigned short io_exchange_al(unsigned char channel, unsigned short tx_len) { } void io_exchange_with_code(uint16_t code, uint16_t tx) { - G_io_apdu_buffer[ tx++ ] = code >> 8; - G_io_apdu_buffer[ tx++ ] = code & 0xff; + G_io_apdu_buffer[tx++] = code >> 8; + G_io_apdu_buffer[tx++] = code & 0xff; io_exchange(CHANNEL_APDU | IO_RETURN_AFTER_TX, tx); } diff --git a/src/ui/ui_common.h b/src/ui/ui_common.h index 130f35b..00ea0e2 100644 --- a/src/ui/ui_common.h +++ b/src/ui/ui_common.h @@ -2,7 +2,7 @@ #include -#include "io.h" +#include "app_io.h" #include "os.h" #include "ux.h" diff --git a/src/ui/ui_get_public_key.c b/src/ui/ui_get_public_key.c index ca1afb3..511caea 100644 --- a/src/ui/ui_get_public_key.c +++ b/src/ui/ui_get_public_key.c @@ -1,13 +1,12 @@ #include "get_public_key.h" +#include "glyphs.h" #include "ui_common.h" #include "ux.h" -#include "glyphs.h" #ifdef HAVE_NBGL #include "nbgl_use_case.h" #endif - #if defined(TARGET_NANOS) static const bagl_element_t ui_get_public_key_compare[] = { @@ -74,7 +73,7 @@ static const bagl_element_t* ui_prepro_get_public_key_compare( static void compare_pk() { // init partial key str from full str memmove(gpk_ctx.partial_key, gpk_ctx.full_key, DISPLAY_SIZE); - gpk_ctx.partial_key[ DISPLAY_SIZE ] = '\0'; + gpk_ctx.partial_key[DISPLAY_SIZE] = '\0'; // init display index gpk_ctx.display_index = 0; @@ -131,8 +130,7 @@ UX_STEP_NOCB(ux_approve_pk_flow_1_step, bn, UX_STEP_VALID(ux_approve_pk_flow_2_step, pb, pk_approved(), {&C_icon_validate_14, "Approve"}); -UX_STEP_VALID(ux_approve_pk_flow_3_step, pb, - pk_rejected(), +UX_STEP_VALID(ux_approve_pk_flow_3_step, pb, pk_rejected(), {&C_icon_crossmark, "Reject"}); UX_DEF(ux_approve_pk_flow, &ux_approve_pk_flow_1_step, @@ -140,7 +138,6 @@ UX_DEF(ux_approve_pk_flow, &ux_approve_pk_flow_1_step, #elif defined(HAVE_NBGL) - static void callback_match(bool match) { if (match) { io_exchange_with_code(EXCEPTION_OK, 32); @@ -152,7 +149,8 @@ static void callback_match(bool match) { static void callback_export(bool accept) { if (accept) { - nbgl_useCaseAddressConfirmation((const char *) gpk_ctx.full_key, callback_match); + nbgl_useCaseAddressConfirmation((const char *)gpk_ctx.full_key, + callback_match); } else { io_exchange_with_code(EXCEPTION_USER_REJECTED, 0); ui_idle(); @@ -160,16 +158,16 @@ static void callback_export(bool accept) { } static void ui_get_public_key_nbgl(void) { - nbgl_useCaseChoice(&C_icon_hedera_64x64, "Export Public Key?", gpk_ctx.ui_approve_l2, "Allow", "Don't allow", callback_export); + nbgl_useCaseChoice(&C_icon_hedera_64x64, "Export Public Key?", + gpk_ctx.ui_approve_l2, "Allow", "Don't allow", + callback_export); } - #endif // TARGET // Common for all devices void ui_get_public_key(void) { - #if defined(TARGET_NANOS) UX_DISPLAY(ui_get_public_key_approve, NULL); @@ -183,5 +181,4 @@ void ui_get_public_key(void) { ui_get_public_key_nbgl(); #endif // #if TARGET_ - } diff --git a/src/ui/ui_idle.c b/src/ui/ui_idle.c index ae042b5..258ce90 100644 --- a/src/ui/ui_idle.c +++ b/src/ui/ui_idle.c @@ -1,7 +1,7 @@ -#include "ux.h" #include "glyphs.h" -#include "utils.h" #include "ui_common.h" +#include "utils.h" +#include "ux.h" #ifdef HAVE_NBGL #include "nbgl_page.h" @@ -18,33 +18,33 @@ ux_state_t ux; unsigned int ux_step; unsigned int ux_step_count; -static const ux_menu_entry_t menu_main[ 4 ]; - -static const ux_menu_entry_t menu_about[ 3 ] = {{ - .menu = NULL, - .callback = NULL, - .userid = 0, - .icon = NULL, - .line1 = "Version", - .line2 = APPVERSION, - .text_x = 0, - .icon_x = 0, - }, - - { - .menu = menu_main, - .callback = NULL, - .userid = 0, - .icon = &C_icon_back, - .line1 = "Back", - .line2 = NULL, - .text_x = 61, - .icon_x = 40, - }, - - UX_MENU_END}; - -static const ux_menu_entry_t menu_main[ 4 ] = { +static const ux_menu_entry_t menu_main[4]; + +static const ux_menu_entry_t menu_about[3] = {{ + .menu = NULL, + .callback = NULL, + .userid = 0, + .icon = NULL, + .line1 = "Version", + .line2 = APPVERSION, + .text_x = 0, + .icon_x = 0, + }, + + { + .menu = menu_main, + .callback = NULL, + .userid = 0, + .icon = &C_icon_back, + .line1 = "Back", + .line2 = NULL, + .text_x = 61, + .icon_x = 40, + }, + + UX_MENU_END}; + +static const ux_menu_entry_t menu_main[4] = { {.menu = NULL, .callback = NULL, .userid = 0, @@ -93,50 +93,28 @@ UX_STEP_VALID(ux_idle_flow_3_step, pb, os_sched_exit(-1), UX_DEF(ux_idle_flow, &ux_idle_flow_1_step, &ux_idle_flow_2_step, &ux_idle_flow_3_step); +#elif defined(TARGET_STAX) || defined(TARGET_FLEX) -#elif defined(TARGET_STAX) +#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, + "(c) 2024 Ledger"}; +static const nbgl_contentInfoList_t infoList = { + .nbInfos = SETTING_INFO_NB, + .infoTypes = info_types, + .infoContents = info_contents, +}; -static const char* const infoTypes[] = {"Version", "Hedera"}; -static const char* const infoContents[] = {APPVERSION, "(c) 2022 Ledger"}; - -static void ui_idle_nbgl(void); - -static bool ui_menu_about_nav_callback(uint8_t page, nbgl_pageContent_t* content) { - UNUSED(page); - content->type = INFOS_LIST; - content->infosList.nbInfos = ARRAY_COUNT(infoTypes); - content->infosList.infoTypes = (const char**) infoTypes; - content->infosList.infoContents = (const char**) infoContents; - return true; -} - -static void ui_menu_about(void) { - nbgl_useCaseSettings("Hedera Stax Application", - 0, - 1, - false, - ui_idle_nbgl, - ui_menu_about_nav_callback, - NULL); -} - -static void quit_app_callback(void) { - os_sched_exit(-1); -} +static void quit_app_callback(void) { os_sched_exit(-1); } static void ui_idle_nbgl(void) { - nbgl_useCaseHome("Hedera", - &C_icon_hedera_64x64, - NULL, - false, - ui_menu_about, - quit_app_callback); + nbgl_useCaseHomeAndSettings(APPNAME, &C_icon_hedera_64x64, NULL, + INIT_HOME_PAGE, NULL, &infoList, NULL, + quit_app_callback); } - #endif - // Common for all devices void ui_idle(void) { @@ -151,7 +129,7 @@ void ui_idle(void) { } ux_flow_init(0, ux_idle_flow, NULL); -#elif defined (TARGET_STAX) +#elif defined(TARGET_STAX) || defined(TARGET_FLEX) ui_idle_nbgl(); diff --git a/src/ui/ui_sign_transaction.c b/src/ui/ui_sign_transaction.c index b57aa9c..7813069 100644 --- a/src/ui/ui_sign_transaction.c +++ b/src/ui/ui_sign_transaction.c @@ -1,15 +1,14 @@ -#include "ux.h" #include "glyphs.h" +#include "proto/crypto_create.pb.h" #include "sign_transaction.h" #include "ui_common.h" -#include "proto/crypto_create.pb.h" +#include "ux.h" #ifdef HAVE_NBGL #include "nbgl_page.h" #include "nbgl_use_case.h" #endif - #if defined(TARGET_NANOS) static uint8_t num_screens(size_t length) { @@ -270,13 +269,19 @@ void handle_intermediate_left_press() { // Other flows do not have Recipients case Recipients: { if (first_screen()) { - if( - (st_ctx.type == Create || st_ctx.type == Update) - && st_ctx.transaction.data.cryptoCreateAccount.which_staked_id != Hedera_CryptoCreateTransactionBody_staked_account_id_tag - && st_ctx.transaction.data.cryptoCreateAccount.which_staked_id != Hedera_CryptoCreateTransactionBody_staked_node_id_tag - && st_ctx.transaction.data.cryptoUpdateAccount.which_staked_id != Hedera_CryptoUpdateTransactionBody_staked_account_id_tag - && st_ctx.transaction.data.cryptoUpdateAccount.which_staked_id != Hedera_CryptoUpdateTransactionBody_staked_node_id_tag - ) { + if ((st_ctx.type == Create || st_ctx.type == Update) && + st_ctx.transaction.data.cryptoCreateAccount + .which_staked_id != + Hedera_CryptoCreateTransactionBody_staked_account_id_tag && + st_ctx.transaction.data.cryptoCreateAccount + .which_staked_id != + Hedera_CryptoCreateTransactionBody_staked_node_id_tag && + st_ctx.transaction.data.cryptoUpdateAccount + .which_staked_id != + Hedera_CryptoUpdateTransactionBody_staked_account_id_tag && + st_ctx.transaction.data.cryptoUpdateAccount + .which_staked_id != + Hedera_CryptoUpdateTransactionBody_staked_node_id_tag) { st_ctx.step = Operator; st_ctx.display_index = 1; update_display_count(); @@ -385,13 +390,19 @@ void handle_intermediate_right_press() { // All flows proceed from Operator to Senders case Operator: { if (last_screen()) { // Continue to Senders - if( - (st_ctx.type == Create || st_ctx.type == Update) - && st_ctx.transaction.data.cryptoCreateAccount.which_staked_id != Hedera_CryptoCreateTransactionBody_staked_account_id_tag - && st_ctx.transaction.data.cryptoCreateAccount.which_staked_id != Hedera_CryptoCreateTransactionBody_staked_node_id_tag - && st_ctx.transaction.data.cryptoUpdateAccount.which_staked_id != Hedera_CryptoUpdateTransactionBody_staked_account_id_tag - && st_ctx.transaction.data.cryptoUpdateAccount.which_staked_id != Hedera_CryptoUpdateTransactionBody_staked_node_id_tag - ) { + if ((st_ctx.type == Create || st_ctx.type == Update) && + st_ctx.transaction.data.cryptoCreateAccount + .which_staked_id != + Hedera_CryptoCreateTransactionBody_staked_account_id_tag && + st_ctx.transaction.data.cryptoCreateAccount + .which_staked_id != + Hedera_CryptoCreateTransactionBody_staked_node_id_tag && + st_ctx.transaction.data.cryptoUpdateAccount + .which_staked_id != + Hedera_CryptoUpdateTransactionBody_staked_account_id_tag && + st_ctx.transaction.data.cryptoUpdateAccount + .which_staked_id != + Hedera_CryptoUpdateTransactionBody_staked_node_id_tag) { st_ctx.step = Amount; st_ctx.display_index = 1; update_display_count(); @@ -677,48 +688,42 @@ UX_DEF(ux_burn_mint_flow, &summary_step, &operator_step, &senders_step, UX_DEF(ux_associate_flow, &summary_step, &operator_step, &senders_step, &fee_step, &memo_step, &confirm_step, &reject_step); - #elif defined(HAVE_NBGL) - -static void rejectChoice(void) { - io_exchange_with_code(EXCEPTION_USER_REJECTED, 0); - nbgl_useCaseStatus("Transaction\nrejected", false, ui_idle); -} - -static void rejectUseCaseChoice(void) { - nbgl_useCaseConfirm("Reject transaction?", NULL, "Yes, reject", "Go back to transaction", rejectChoice); -} - -static void review_final_callback(bool confirmed) { - if (confirmed) { +static void review_choice(bool confirm) { + // Answer, display a status page and go back to main + if (confirm) { io_exchange_with_code(EXCEPTION_OK, 64); - nbgl_useCaseStatus("TRANSACTION\nSIGNED", true, ui_idle); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, ui_idle); } else { - rejectUseCaseChoice(); + io_exchange_with_code(EXCEPTION_USER_REJECTED, 0); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, ui_idle); } } // Max is 7 infos for transfer transaction -// If a new flow is added or flows are modified to include more steps, don't forget to update the infos array size! -static nbgl_layoutTagValue_t infos[7]; -static nbgl_layoutTagValueList_t layout; -static nbgl_pageInfoLongPress_t review_final_long_press; +// If a new flow is added or flows are modified to include more steps, don't +// forget to update the infos array size! +static nbgl_contentTagValue_t infos[7]; +// Content of the review flow +static nbgl_contentTagValueList_t content; static char review_start_title[64]; static char review_final_title[64]; static void create_transaction_flow(void) { uint8_t index = 0; infos[index].value = st_ctx.summary_line_1; - snprintf(review_start_title, sizeof(review_start_title), "Review transaction to\n%s", st_ctx.summary_line_1); - snprintf(review_final_title, sizeof(review_final_title), "Sign transaction to\n%s", st_ctx.summary_line_1); + snprintf(review_start_title, sizeof(review_start_title), + "Review transaction to\n%s", st_ctx.summary_line_1); + snprintf(review_final_title, sizeof(review_final_title), + "Sign transaction to\n%s", st_ctx.summary_line_1); infos[index].item = "With key"; infos[index].value = st_ctx.summary_line_2; ++index; switch (st_ctx.type) { - case Verify: + case Verify: // FALLTHROUGH case Associate: infos[index].item = st_ctx.senders_title; @@ -739,7 +744,7 @@ static void create_transaction_flow(void) { infos[index].value = st_ctx.memo; ++index; break; - case TokenTransfer: + case TokenTransfer: // FALLTHROUGH case Transfer: infos[index].item = "Operator"; @@ -761,7 +766,7 @@ static void create_transaction_flow(void) { infos[index].value = st_ctx.memo; ++index; break; - case TokenMint: + case TokenMint: // FALLTHROUGH case TokenBurn: infos[index].item = st_ctx.senders_title; @@ -776,28 +781,18 @@ static void create_transaction_flow(void) { ; } - // If a new flow is added or flows are modified to include more steps, don't forget to update the infos array size! - layout.nbPairs = index; - layout.nbMaxLinesForValue = 0; - layout.smallCaseForValue = true; - layout.wrapping = true; - layout.pairs = infos; - - review_final_long_press.text = review_final_title, - review_final_long_press.icon = &C_icon_hedera_64x64; - review_final_long_press.longPressText = "Hold to sign"; - review_final_long_press.longPressToken = 0; - review_final_long_press.tuneId = TUNE_TAP_CASUAL; -} - -static void start_review(void) { - nbgl_useCaseStaticReview(&layout, &review_final_long_press, "Reject transaction", review_final_callback); + // If a new flow is added or flows are modified to include more steps, don't + // forget to update the infos array size! + content.nbMaxLinesForValue = 0; + content.smallCaseForValue = true; + content.wrapping = true; + content.pairs = infos; + content.callback = NULL; + content.startIndex = 0; + content.nbPairs = index; } - - #endif - // Common for all devices void ui_sign_transaction(void) { @@ -808,7 +803,7 @@ void ui_sign_transaction(void) { #elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) switch (st_ctx.type) { - case Associate: + case Associate: // FALLTHROUGH case Dissociate: ux_flow_init(0, ux_associate_flow, NULL); @@ -816,16 +811,16 @@ void ui_sign_transaction(void) { case Verify: ux_flow_init(0, ux_verify_flow, NULL); break; - case Create: + case Create: // FALLTHROUGH - case Update: + case Update: // FALLTHROUGH - case TokenTransfer: + case TokenTransfer: // FALLTHROUGH case Transfer: ux_flow_init(0, ux_transfer_flow, NULL); break; - case TokenMint: + case TokenMint: // FALLTHROUGH case TokenBurn: ux_flow_init(0, ux_burn_mint_flow, NULL); @@ -839,12 +834,9 @@ void ui_sign_transaction(void) { create_transaction_flow(); - nbgl_useCaseReviewStart(&C_icon_hedera_64x64, - review_start_title, - "", - "Reject transaction", - start_review, - rejectUseCaseChoice); - + // Start review + nbgl_useCaseReview(TYPE_TRANSACTION, &content, &C_icon_hedera_64x64, + review_start_title, NULL, review_final_title, + review_choice); #endif } diff --git a/src/utils.c b/src/utils.c index c40c4b4..b828cc1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,25 +1,24 @@ #include "utils.h" -#include "globals.h" -void public_key_to_bytes(unsigned char *dst, uint8_t raw_pubkey[static 65]) { +void public_key_to_bytes(unsigned char *dst, uint8_t raw_pubkey[static RAW_PUBKEY_SIZE]) { if (dst == NULL || raw_pubkey == NULL) { THROW(EXCEPTION_MALFORMED_APDU); } - + for (int i = 0; i < 32; i++) { - dst[ i ] = raw_pubkey[ 64 - i ]; + dst[i] = raw_pubkey[64 - i]; } - if (raw_pubkey[ 32 ] & 1) { - dst[ 31 ] |= 0x80; + if (raw_pubkey[32] & 1) { + dst[31] |= 0x80; } } void bin2hex(uint8_t *dst, uint8_t *data, uint64_t inlen) { static uint8_t const hex[] = "0123456789abcdef"; for (uint64_t i = 0; i < inlen; i++) { - dst[ 2 * i + 0 ] = hex[ (data[ i ] >> 4) & 0x0F ]; - dst[ 2 * i + 1 ] = hex[ (data[ i ] >> 0) & 0x0F ]; + dst[2 * i + 0] = hex[(data[i] >> 4) & 0x0F]; + dst[2 * i + 1] = hex[(data[i] >> 0) & 0x0F]; } - dst[ 2 * inlen ] = '\0'; + dst[2 * inlen] = '\0'; } diff --git a/src/utils.h b/src/utils.h index 1b5a969..cee2d4a 100644 --- a/src/utils.h +++ b/src/utils.h @@ -2,11 +2,12 @@ #include #include +#include "app_globals.h" #define MEMCLEAR(element) explicit_bzero(&element, sizeof(element)) #define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0])) -void public_key_to_bytes(unsigned char *dst, uint8_t raw_pubkey[static 65]); +void public_key_to_bytes(unsigned char *dst, uint8_t raw_pubkey[static RAW_PUBKEY_SIZE]); void bin2hex(uint8_t *dst, uint8_t *data, uint64_t inlen); diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00000.png b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00000.png new file mode 100644 index 0000000..dd3cd5a Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00001.png b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00001.png new file mode 100644 index 0000000..1653bf0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00002.png b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00002.png new file mode 100644 index 0000000..a6d0f93 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00003.png b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00003.png new file mode 100644 index 0000000..efbfe51 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00004.png b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00004.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00005.png b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_ok/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00000.png b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00000.png new file mode 100644 index 0000000..dd3cd5a Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00001.png b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00001.png new file mode 100644 index 0000000..1653bf0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00002.png b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00002.png new file mode 100644 index 0000000..a6d0f93 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00003.png b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00003.png new file mode 100644 index 0000000..efbfe51 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00004.png b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00004.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00005.png b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00005.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00006.png b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00006.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_refused/00006.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00000.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00000.png new file mode 100644 index 0000000..dd3cd5a Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00001.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00001.png new file mode 100644 index 0000000..1653bf0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00002.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00002.png new file mode 100644 index 0000000..a6d0f93 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00003.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00003.png new file mode 100644 index 0000000..efbfe51 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00004.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00004.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00005.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_ok/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00000.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00000.png new file mode 100644 index 0000000..dd3cd5a Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00001.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00001.png new file mode 100644 index 0000000..1653bf0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00002.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00002.png new file mode 100644 index 0000000..a6d0f93 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00003.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00003.png new file mode 100644 index 0000000..efbfe51 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00004.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00004.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00005.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00005.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00006.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00006.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_account_refused/00006.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00000.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00000.png new file mode 100644 index 0000000..dd3cd5a Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00001.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00001.png new file mode 100644 index 0000000..1653bf0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00002.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00002.png new file mode 100644 index 0000000..a6d0f93 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00003.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00003.png new file mode 100644 index 0000000..efbfe51 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00004.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00004.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00005.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_ok/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00000.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00000.png new file mode 100644 index 0000000..dd3cd5a Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00001.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00001.png new file mode 100644 index 0000000..1653bf0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00002.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00002.png new file mode 100644 index 0000000..a6d0f93 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00003.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00003.png new file mode 100644 index 0000000..efbfe51 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00004.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00004.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00005.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00005.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00006.png b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00006.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_create_account_stake_node_refused/00006.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00000.png b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00000.png new file mode 100644 index 0000000..13c94e3 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00001.png b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00002.png b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00002.png new file mode 100644 index 0000000..4fd927e Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00003.png b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00004.png b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00000.png b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00000.png new file mode 100644 index 0000000..13c94e3 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00001.png b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00002.png b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00002.png new file mode 100644 index 0000000..4fd927e Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00003.png b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00004.png b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00005.png b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00000.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00000.png new file mode 100644 index 0000000..13c94e3 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00001.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00002.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00002.png new file mode 100644 index 0000000..4fd927e Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00003.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00004.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00000.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00000.png new file mode 100644 index 0000000..13c94e3 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00001.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00002.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00002.png new file mode 100644 index 0000000..4fd927e Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00003.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00004.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00005.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_account_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00000.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00000.png new file mode 100644 index 0000000..13c94e3 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00001.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00002.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00002.png new file mode 100644 index 0000000..4fd927e Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00003.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00004.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00000.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00000.png new file mode 100644 index 0000000..13c94e3 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00001.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00002.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00002.png new file mode 100644 index 0000000..4fd927e Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00003.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00004.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00005.png b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_crypto_update_account_stake_node_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00000.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00000.png new file mode 100644 index 0000000..99a3450 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00001.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00001.png new file mode 100644 index 0000000..3938b87 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00002.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00002.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_0/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00000.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00000.png new file mode 100644 index 0000000..c9d98a5 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00001.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00001.png new file mode 100644 index 0000000..7b58512 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00002.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00002.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_1/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00000.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00000.png new file mode 100644 index 0000000..1dd2562 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00001.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00001.png new file mode 100644 index 0000000..12c88f0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00002.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00002.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_2/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00000.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00000.png new file mode 100644 index 0000000..7f63b4e Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00001.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00001.png new file mode 100644 index 0000000..1715060 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00002.png b/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00002.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_ok_3/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_refused/00000.png b/tests/snapshots/flex/test_hedera_get_public_key_refused/00000.png new file mode 100644 index 0000000..99a3450 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_refused/00001.png b/tests/snapshots/flex/test_hedera_get_public_key_refused/00001.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00000.png b/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00000.png new file mode 100644 index 0000000..99a3450 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00001.png b/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00001.png new file mode 100644 index 0000000..3938b87 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00002.png b/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00002.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_get_public_key_refused_2/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_ok/00000.png b/tests/snapshots/flex/test_hedera_token_associate_ok/00000.png new file mode 100644 index 0000000..2ee8da0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_ok/00001.png b/tests/snapshots/flex/test_hedera_token_associate_ok/00001.png new file mode 100644 index 0000000..50a1f96 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_ok/00002.png b/tests/snapshots/flex/test_hedera_token_associate_ok/00002.png new file mode 100644 index 0000000..586cbf1 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_ok/00003.png b/tests/snapshots/flex/test_hedera_token_associate_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_ok/00004.png b/tests/snapshots/flex/test_hedera_token_associate_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_refused/00000.png b/tests/snapshots/flex/test_hedera_token_associate_refused/00000.png new file mode 100644 index 0000000..2ee8da0 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_refused/00001.png b/tests/snapshots/flex/test_hedera_token_associate_refused/00001.png new file mode 100644 index 0000000..50a1f96 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_refused/00002.png b/tests/snapshots/flex/test_hedera_token_associate_refused/00002.png new file mode 100644 index 0000000..586cbf1 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_refused/00003.png b/tests/snapshots/flex/test_hedera_token_associate_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_refused/00004.png b/tests/snapshots/flex/test_hedera_token_associate_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_associate_refused/00005.png b/tests/snapshots/flex/test_hedera_token_associate_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_associate_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_ok/00000.png b/tests/snapshots/flex/test_hedera_token_burn_ok/00000.png new file mode 100644 index 0000000..c877167 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_ok/00001.png b/tests/snapshots/flex/test_hedera_token_burn_ok/00001.png new file mode 100644 index 0000000..a6dec60 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_ok/00002.png b/tests/snapshots/flex/test_hedera_token_burn_ok/00002.png new file mode 100644 index 0000000..cfedabe Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_ok/00003.png b/tests/snapshots/flex/test_hedera_token_burn_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_ok/00004.png b/tests/snapshots/flex/test_hedera_token_burn_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_refused/00000.png b/tests/snapshots/flex/test_hedera_token_burn_refused/00000.png new file mode 100644 index 0000000..c877167 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_refused/00001.png b/tests/snapshots/flex/test_hedera_token_burn_refused/00001.png new file mode 100644 index 0000000..a6dec60 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_refused/00002.png b/tests/snapshots/flex/test_hedera_token_burn_refused/00002.png new file mode 100644 index 0000000..cfedabe Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_refused/00003.png b/tests/snapshots/flex/test_hedera_token_burn_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_refused/00004.png b/tests/snapshots/flex/test_hedera_token_burn_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_burn_refused/00005.png b/tests/snapshots/flex/test_hedera_token_burn_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_burn_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_ok/00000.png b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00000.png new file mode 100644 index 0000000..4cf381f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_ok/00001.png b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_ok/00002.png b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00002.png new file mode 100644 index 0000000..dad2217 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_ok/00003.png b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_ok/00004.png b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_refused/00000.png b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00000.png new file mode 100644 index 0000000..4cf381f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_refused/00001.png b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00001.png new file mode 100644 index 0000000..e80fe3c Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_refused/00002.png b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00002.png new file mode 100644 index 0000000..dad2217 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_refused/00003.png b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_refused/00004.png b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_dissociate_refused/00005.png b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_dissociate_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_ok/00000.png b/tests/snapshots/flex/test_hedera_token_mint_ok/00000.png new file mode 100644 index 0000000..67d52c6 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_ok/00001.png b/tests/snapshots/flex/test_hedera_token_mint_ok/00001.png new file mode 100644 index 0000000..a6dec60 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_ok/00002.png b/tests/snapshots/flex/test_hedera_token_mint_ok/00002.png new file mode 100644 index 0000000..55d238f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_ok/00003.png b/tests/snapshots/flex/test_hedera_token_mint_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_ok/00004.png b/tests/snapshots/flex/test_hedera_token_mint_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_refused/00000.png b/tests/snapshots/flex/test_hedera_token_mint_refused/00000.png new file mode 100644 index 0000000..67d52c6 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_refused/00001.png b/tests/snapshots/flex/test_hedera_token_mint_refused/00001.png new file mode 100644 index 0000000..a6dec60 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_refused/00002.png b/tests/snapshots/flex/test_hedera_token_mint_refused/00002.png new file mode 100644 index 0000000..55d238f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_refused/00003.png b/tests/snapshots/flex/test_hedera_token_mint_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_refused/00004.png b/tests/snapshots/flex/test_hedera_token_mint_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_token_mint_refused/00005.png b/tests/snapshots/flex/test_hedera_token_mint_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_token_mint_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00000.png b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00000.png new file mode 100644 index 0000000..4e9d1b5 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00001.png b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00001.png new file mode 100644 index 0000000..10d8650 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00002.png b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00002.png new file mode 100644 index 0000000..5cd7f49 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00003.png b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00003.png new file mode 100644 index 0000000..76b2bb8 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00004.png b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00004.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00005.png b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_ok/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00000.png b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00000.png new file mode 100644 index 0000000..4e9d1b5 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00001.png b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00001.png new file mode 100644 index 0000000..10d8650 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00002.png b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00002.png new file mode 100644 index 0000000..5cd7f49 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00003.png b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00003.png new file mode 100644 index 0000000..76b2bb8 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00004.png b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00004.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00005.png b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00005.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00006.png b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00006.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_hbar_refused/00006.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_ok/00000.png b/tests/snapshots/flex/test_hedera_transfer_token_ok/00000.png new file mode 100644 index 0000000..8f5f0fb Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_ok/00001.png b/tests/snapshots/flex/test_hedera_transfer_token_ok/00001.png new file mode 100644 index 0000000..8e9cde8 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_ok/00002.png b/tests/snapshots/flex/test_hedera_transfer_token_ok/00002.png new file mode 100644 index 0000000..0e25378 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_ok/00003.png b/tests/snapshots/flex/test_hedera_transfer_token_ok/00003.png new file mode 100644 index 0000000..c57adbd Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_ok/00004.png b/tests/snapshots/flex/test_hedera_transfer_token_ok/00004.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_ok/00005.png b/tests/snapshots/flex/test_hedera_transfer_token_ok/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_ok/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_refused/00000.png b/tests/snapshots/flex/test_hedera_transfer_token_refused/00000.png new file mode 100644 index 0000000..8f5f0fb Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_refused/00001.png b/tests/snapshots/flex/test_hedera_transfer_token_refused/00001.png new file mode 100644 index 0000000..8e9cde8 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_refused/00002.png b/tests/snapshots/flex/test_hedera_transfer_token_refused/00002.png new file mode 100644 index 0000000..0e25378 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_refused/00003.png b/tests/snapshots/flex/test_hedera_transfer_token_refused/00003.png new file mode 100644 index 0000000..c57adbd Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_refused/00004.png b/tests/snapshots/flex/test_hedera_transfer_token_refused/00004.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_refused/00005.png b/tests/snapshots/flex/test_hedera_transfer_token_refused/00005.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_refused/00005.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_token_refused/00006.png b/tests/snapshots/flex/test_hedera_transfer_token_refused/00006.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_token_refused/00006.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_ok/00000.png b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00000.png new file mode 100644 index 0000000..7063ac2 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_ok/00001.png b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00001.png new file mode 100644 index 0000000..1f6752d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_ok/00002.png b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00002.png new file mode 100644 index 0000000..370e76b Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_ok/00003.png b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_ok/00004.png b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00004.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_ok/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_refused/00000.png b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00000.png new file mode 100644 index 0000000..7063ac2 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00000.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_refused/00001.png b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00001.png new file mode 100644 index 0000000..1f6752d Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00001.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_refused/00002.png b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00002.png new file mode 100644 index 0000000..370e76b Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00002.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_refused/00003.png b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00003.png new file mode 100644 index 0000000..08bca22 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00003.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_refused/00004.png b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00004.png differ diff --git a/tests/snapshots/flex/test_hedera_transfer_verify_refused/00005.png b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00005.png new file mode 100644 index 0000000..aa92239 Binary files /dev/null and b/tests/snapshots/flex/test_hedera_transfer_verify_refused/00005.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00000.png b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00000.png index 4d4451b..9e9dfb7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00000.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00001.png b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00001.png index 0681261..372b5ca 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00001.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00002.png b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00002.png index b094ae4..70ce5ce 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00002.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00003.png b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00003.png index a984a34..dd6e634 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00003.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00004.png b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00004.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00004.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_ok/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00000.png b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00000.png index 4d4451b..9e9dfb7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00000.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00001.png b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00001.png index 0681261..372b5ca 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00001.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00002.png b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00002.png index b094ae4..70ce5ce 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00002.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00003.png b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00003.png index a984a34..dd6e634 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00003.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00004.png b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00004.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00004.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00005.png b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00005.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00005.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_refused/00005.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00000.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00000.png index 4d4451b..9e9dfb7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00000.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00001.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00001.png index 0681261..372b5ca 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00001.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00002.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00002.png index b094ae4..70ce5ce 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00002.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00003.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00003.png index a984a34..dd6e634 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00003.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00004.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00004.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00004.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_ok/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00000.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00000.png index 4d4451b..9e9dfb7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00000.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00001.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00001.png index 0681261..372b5ca 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00001.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00002.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00002.png index b094ae4..70ce5ce 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00002.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00003.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00003.png index a984a34..dd6e634 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00003.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00004.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00004.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00004.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00005.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00005.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00005.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_account_refused/00005.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00000.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00000.png index 4d4451b..9e9dfb7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00000.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00001.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00001.png index 0681261..372b5ca 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00001.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00002.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00002.png index b094ae4..70ce5ce 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00002.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00003.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00003.png index a984a34..dd6e634 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00003.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00004.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00004.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00004.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_ok/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00000.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00000.png index 4d4451b..9e9dfb7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00000.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00001.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00001.png index 0681261..372b5ca 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00001.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00002.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00002.png index b094ae4..70ce5ce 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00002.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00003.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00003.png index a984a34..dd6e634 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00003.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00004.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00004.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00004.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00005.png b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00005.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00005.png and b/tests/snapshots/stax/test_hedera_crypto_create_account_stake_node_refused/00005.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00000.png b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00000.png index c58e133..7cbd128 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00000.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00001.png b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00001.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00002.png b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00002.png index a6ca722..bdd95d7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00002.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00003.png b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00003.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00000.png b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00000.png index c58e133..7cbd128 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00000.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00001.png b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00001.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00002.png b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00002.png index a6ca722..bdd95d7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00002.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00003.png b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00003.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00004.png b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00004.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00000.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00000.png index c58e133..7cbd128 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00000.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00001.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00001.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00002.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00002.png index a6ca722..bdd95d7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00002.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00003.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00003.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00000.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00000.png index c58e133..7cbd128 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00000.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00001.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00001.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00002.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00002.png index a6ca722..bdd95d7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00002.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00003.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00003.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00004.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00004.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_account_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00000.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00000.png index c58e133..7cbd128 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00000.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00001.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00001.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00002.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00002.png index a6ca722..bdd95d7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00002.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00003.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00003.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00000.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00000.png index c58e133..7cbd128 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00000.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00001.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00001.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00002.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00002.png index a6ca722..bdd95d7 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00002.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00003.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00003.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00004.png b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00004.png and b/tests/snapshots/stax/test_hedera_crypto_update_account_stake_node_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_ok/00000.png b/tests/snapshots/stax/test_hedera_token_associate_ok/00000.png index d0998ea..dd4f4dc 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_ok/00000.png and b/tests/snapshots/stax/test_hedera_token_associate_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_ok/00001.png b/tests/snapshots/stax/test_hedera_token_associate_ok/00001.png index c7bf5f1..ac3264d 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_ok/00001.png and b/tests/snapshots/stax/test_hedera_token_associate_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_ok/00002.png b/tests/snapshots/stax/test_hedera_token_associate_ok/00002.png index 45231e7..2f6888a 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_ok/00002.png and b/tests/snapshots/stax/test_hedera_token_associate_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_ok/00003.png b/tests/snapshots/stax/test_hedera_token_associate_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_ok/00003.png and b/tests/snapshots/stax/test_hedera_token_associate_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_refused/00000.png b/tests/snapshots/stax/test_hedera_token_associate_refused/00000.png index d0998ea..dd4f4dc 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_refused/00000.png and b/tests/snapshots/stax/test_hedera_token_associate_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_refused/00001.png b/tests/snapshots/stax/test_hedera_token_associate_refused/00001.png index c7bf5f1..ac3264d 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_refused/00001.png and b/tests/snapshots/stax/test_hedera_token_associate_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_refused/00002.png b/tests/snapshots/stax/test_hedera_token_associate_refused/00002.png index 45231e7..2f6888a 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_refused/00002.png and b/tests/snapshots/stax/test_hedera_token_associate_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_refused/00003.png b/tests/snapshots/stax/test_hedera_token_associate_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_refused/00003.png and b/tests/snapshots/stax/test_hedera_token_associate_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_associate_refused/00004.png b/tests/snapshots/stax/test_hedera_token_associate_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_token_associate_refused/00004.png and b/tests/snapshots/stax/test_hedera_token_associate_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_ok/00000.png b/tests/snapshots/stax/test_hedera_token_burn_ok/00000.png index 6ba68e5..3f05892 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_ok/00000.png and b/tests/snapshots/stax/test_hedera_token_burn_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_ok/00001.png b/tests/snapshots/stax/test_hedera_token_burn_ok/00001.png index 9681cd1..09369b4 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_ok/00001.png and b/tests/snapshots/stax/test_hedera_token_burn_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_ok/00002.png b/tests/snapshots/stax/test_hedera_token_burn_ok/00002.png index 6682691..14c7f6a 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_ok/00002.png and b/tests/snapshots/stax/test_hedera_token_burn_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_ok/00003.png b/tests/snapshots/stax/test_hedera_token_burn_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_ok/00003.png and b/tests/snapshots/stax/test_hedera_token_burn_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_refused/00000.png b/tests/snapshots/stax/test_hedera_token_burn_refused/00000.png index 6ba68e5..3f05892 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_refused/00000.png and b/tests/snapshots/stax/test_hedera_token_burn_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_refused/00001.png b/tests/snapshots/stax/test_hedera_token_burn_refused/00001.png index 9681cd1..09369b4 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_refused/00001.png and b/tests/snapshots/stax/test_hedera_token_burn_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_refused/00002.png b/tests/snapshots/stax/test_hedera_token_burn_refused/00002.png index 6682691..14c7f6a 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_refused/00002.png and b/tests/snapshots/stax/test_hedera_token_burn_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_refused/00003.png b/tests/snapshots/stax/test_hedera_token_burn_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_refused/00003.png and b/tests/snapshots/stax/test_hedera_token_burn_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_burn_refused/00004.png b/tests/snapshots/stax/test_hedera_token_burn_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_token_burn_refused/00004.png and b/tests/snapshots/stax/test_hedera_token_burn_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00000.png b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00000.png index 54c0662..cf235df 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00000.png and b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00001.png b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00001.png and b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00002.png b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00002.png index 8c3128c..2075439 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00002.png and b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00003.png b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_ok/00003.png and b/tests/snapshots/stax/test_hedera_token_dissociate_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00000.png b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00000.png index 54c0662..cf235df 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00000.png and b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00001.png b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00001.png index d644049..d9afc76 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00001.png and b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00002.png b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00002.png index 8c3128c..2075439 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00002.png and b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00003.png b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00003.png and b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00004.png b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_token_dissociate_refused/00004.png and b/tests/snapshots/stax/test_hedera_token_dissociate_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_ok/00000.png b/tests/snapshots/stax/test_hedera_token_mint_ok/00000.png index 583b5d3..6c178a2 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_ok/00000.png and b/tests/snapshots/stax/test_hedera_token_mint_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_ok/00001.png b/tests/snapshots/stax/test_hedera_token_mint_ok/00001.png index 9681cd1..09369b4 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_ok/00001.png and b/tests/snapshots/stax/test_hedera_token_mint_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_ok/00002.png b/tests/snapshots/stax/test_hedera_token_mint_ok/00002.png index cd9f230..709ec4d 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_ok/00002.png and b/tests/snapshots/stax/test_hedera_token_mint_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_ok/00003.png b/tests/snapshots/stax/test_hedera_token_mint_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_ok/00003.png and b/tests/snapshots/stax/test_hedera_token_mint_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_refused/00000.png b/tests/snapshots/stax/test_hedera_token_mint_refused/00000.png index 583b5d3..6c178a2 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_refused/00000.png and b/tests/snapshots/stax/test_hedera_token_mint_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_refused/00001.png b/tests/snapshots/stax/test_hedera_token_mint_refused/00001.png index 9681cd1..09369b4 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_refused/00001.png and b/tests/snapshots/stax/test_hedera_token_mint_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_refused/00002.png b/tests/snapshots/stax/test_hedera_token_mint_refused/00002.png index cd9f230..709ec4d 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_refused/00002.png and b/tests/snapshots/stax/test_hedera_token_mint_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_refused/00003.png b/tests/snapshots/stax/test_hedera_token_mint_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_refused/00003.png and b/tests/snapshots/stax/test_hedera_token_mint_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_token_mint_refused/00004.png b/tests/snapshots/stax/test_hedera_token_mint_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_token_mint_refused/00004.png and b/tests/snapshots/stax/test_hedera_token_mint_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00000.png b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00000.png index 86fda3c..efe13a8 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00000.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00001.png b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00001.png index 6a408e8..89d574c 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00001.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00002.png b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00002.png index cb917bc..414f056 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00002.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00003.png b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00003.png index d45aa64..183f8d4 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00003.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00004.png b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00004.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00004.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_ok/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00000.png b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00000.png index 86fda3c..efe13a8 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00000.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00001.png b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00001.png index 6a408e8..89d574c 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00001.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00002.png b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00002.png index cb917bc..414f056 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00002.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00003.png b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00003.png index d45aa64..183f8d4 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00003.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00004.png b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00004.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00004.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00005.png b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00005.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00005.png and b/tests/snapshots/stax/test_hedera_transfer_hbar_refused/00005.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_ok/00000.png b/tests/snapshots/stax/test_hedera_transfer_token_ok/00000.png index 3d2f39c..7470a89 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_ok/00000.png and b/tests/snapshots/stax/test_hedera_transfer_token_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_ok/00001.png b/tests/snapshots/stax/test_hedera_transfer_token_ok/00001.png index 768f71f..a854ea8 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_ok/00001.png and b/tests/snapshots/stax/test_hedera_transfer_token_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_ok/00002.png b/tests/snapshots/stax/test_hedera_transfer_token_ok/00002.png index 42fb46b..c786e54 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_ok/00002.png and b/tests/snapshots/stax/test_hedera_transfer_token_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_ok/00003.png b/tests/snapshots/stax/test_hedera_transfer_token_ok/00003.png index 51329ab..d1c9ecf 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_ok/00003.png and b/tests/snapshots/stax/test_hedera_transfer_token_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_ok/00004.png b/tests/snapshots/stax/test_hedera_transfer_token_ok/00004.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_ok/00004.png and b/tests/snapshots/stax/test_hedera_transfer_token_ok/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_refused/00000.png b/tests/snapshots/stax/test_hedera_transfer_token_refused/00000.png index 3d2f39c..7470a89 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_refused/00000.png and b/tests/snapshots/stax/test_hedera_transfer_token_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_refused/00001.png b/tests/snapshots/stax/test_hedera_transfer_token_refused/00001.png index 768f71f..a854ea8 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_refused/00001.png and b/tests/snapshots/stax/test_hedera_transfer_token_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_refused/00002.png b/tests/snapshots/stax/test_hedera_transfer_token_refused/00002.png index 42fb46b..c786e54 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_refused/00002.png and b/tests/snapshots/stax/test_hedera_transfer_token_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_refused/00003.png b/tests/snapshots/stax/test_hedera_transfer_token_refused/00003.png index 51329ab..d1c9ecf 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_refused/00003.png and b/tests/snapshots/stax/test_hedera_transfer_token_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_refused/00004.png b/tests/snapshots/stax/test_hedera_transfer_token_refused/00004.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_refused/00004.png and b/tests/snapshots/stax/test_hedera_transfer_token_refused/00004.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_token_refused/00005.png b/tests/snapshots/stax/test_hedera_transfer_token_refused/00005.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_token_refused/00005.png and b/tests/snapshots/stax/test_hedera_transfer_token_refused/00005.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00000.png b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00000.png index c63d182..b0d9d27 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00000.png and b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00001.png b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00001.png index fdd08ac..7aa073e 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00001.png and b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00002.png b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00002.png index c514940..f635d03 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00002.png and b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00003.png b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00003.png index a21279c..2ba6d27 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_ok/00003.png and b/tests/snapshots/stax/test_hedera_transfer_verify_ok/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00000.png b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00000.png index c63d182..b0d9d27 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00000.png and b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00000.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00001.png b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00001.png index fdd08ac..7aa073e 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00001.png and b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00001.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00002.png b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00002.png index c514940..f635d03 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00002.png and b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00002.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00003.png b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00003.png index 9d26114..babad98 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00003.png and b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00003.png differ diff --git a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00004.png b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00004.png index 17d33d6..cebc8be 100644 Binary files a/tests/snapshots/stax/test_hedera_transfer_verify_refused/00004.png and b/tests/snapshots/stax/test_hedera_transfer_verify_refused/00004.png differ diff --git a/tests/test_hedera.py b/tests/test_hedera.py index 636d9d2..bd3be5c 100644 --- a/tests/test_hedera.py +++ b/tests/test_hedera.py @@ -1,5 +1,6 @@ from ragger.backend.interface import RAPDU, RaisePolicy from ragger.navigator import NavInsID +from ragger.firmware import Firmware from .apps.hedera import HederaClient, ErrorType from .apps.hedera_builder import crypto_create_account_conf @@ -62,7 +63,7 @@ def test_hedera_get_public_key_refused(backend, firmware, navigator, test_name): rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED - if firmware.device == "stax": + if not firmware.is_nano: with hedera.get_public_key_confirm(0): backend.raise_policy = RaisePolicy.RAISE_NOTHING nav_ins = [NavInsID.USE_CASE_CHOICE_CONFIRM, @@ -73,7 +74,7 @@ def test_hedera_get_public_key_refused(backend, firmware, navigator, test_name): assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_crypto_create_account_ok(backend, firmware, navigator, test_name): +def test_hedera_crypto_create_account_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_create_account_conf(initialBalance=5) with hedera.send_sign_transaction( @@ -85,10 +86,10 @@ def test_hedera_crypto_create_account_ok(backend, firmware, navigator, test_name memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_crypto_create_account_refused(backend, firmware, navigator, test_name): +def test_hedera_crypto_create_account_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_create_account_conf(initialBalance=5) with hedera.send_sign_transaction( @@ -101,13 +102,13 @@ def test_hedera_crypto_create_account_refused(backend, firmware, navigator, test conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_crypto_create_account_stake_account_ok(backend, firmware, navigator, test_name): +def test_hedera_crypto_create_account_stake_account_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_create_account_conf( initialBalance=5, stakeTargetAccount=666, declineRewards=True @@ -121,10 +122,10 @@ def test_hedera_crypto_create_account_stake_account_ok(backend, firmware, naviga memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_crypto_create_account_stake_account_refused(backend, firmware, navigator, test_name): +def test_hedera_crypto_create_account_stake_account_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_create_account_conf( initialBalance=5, stakeTargetAccount=777, declineRewards=False @@ -139,13 +140,13 @@ def test_hedera_crypto_create_account_stake_account_refused(backend, firmware, n conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_crypto_create_account_stake_node_ok(backend, firmware, navigator, test_name): +def test_hedera_crypto_create_account_stake_node_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_create_account_conf( initialBalance=5, stakeTargetNode=4, declineRewards=True @@ -159,10 +160,10 @@ def test_hedera_crypto_create_account_stake_node_ok(backend, firmware, navigator memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_crypto_create_account_stake_node_refused(backend, firmware, navigator, test_name): +def test_hedera_crypto_create_account_stake_node_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_create_account_conf( initialBalance=5, stakeTargetNode=3, declineRewards=False @@ -177,13 +178,13 @@ def test_hedera_crypto_create_account_stake_node_refused(backend, firmware, navi conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_crypto_update_account_ok(backend, firmware, navigator, test_name): +def test_hedera_crypto_update_account_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_update_account_conf( targetShardNum=6, targetRealmNum=54, targetAccountNum=6789 @@ -197,10 +198,10 @@ def test_hedera_crypto_update_account_ok(backend, firmware, navigator, test_name memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_crypto_update_account_refused(backend, firmware, navigator, test_name): +def test_hedera_crypto_update_account_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_update_account_conf( targetShardNum=6, targetRealmNum=54, targetAccountNum=6789 @@ -215,13 +216,18 @@ def test_hedera_crypto_update_account_refused(backend, firmware, navigator, test conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + if firmware is Firmware.NANOS: + scenario_navigator.review_reject(custom_screen_text="Deny") + elif firmware.is_nano: + scenario_navigator.review_reject(custom_screen_text="Reject") + else: + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_crypto_update_account_stake_account_ok(backend, firmware, navigator, test_name): +def test_hedera_crypto_update_account_stake_account_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_update_account_conf( targetShardNum=8, @@ -239,10 +245,10 @@ def test_hedera_crypto_update_account_stake_account_ok(backend, firmware, naviga memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_crypto_update_account_stake_account_refused(backend, firmware, navigator, test_name): +def test_hedera_crypto_update_account_stake_account_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_update_account_conf( targetShardNum=8, @@ -261,13 +267,13 @@ def test_hedera_crypto_update_account_stake_account_refused(backend, firmware, n conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_crypto_update_account_stake_node_ok(backend, firmware, navigator, test_name): +def test_hedera_crypto_update_account_stake_node_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_update_account_conf( targetShardNum=87, @@ -285,10 +291,10 @@ def test_hedera_crypto_update_account_stake_node_ok(backend, firmware, navigator memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_crypto_update_account_stake_node_refused(backend, firmware, navigator, test_name): +def test_hedera_crypto_update_account_stake_node_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_update_account_conf( targetShardNum=87, @@ -307,13 +313,13 @@ def test_hedera_crypto_update_account_stake_node_refused(backend, firmware, navi conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_transfer_token_ok(backend, firmware, navigator, test_name): +def test_hedera_transfer_token_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_transfer_token_conf( token_shardNum=15, @@ -338,10 +344,10 @@ def test_hedera_transfer_token_ok(backend, firmware, navigator, test_name): memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_transfer_token_refused(backend, firmware, navigator, test_name): +def test_hedera_transfer_token_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_transfer_token_conf( token_shardNum=15, @@ -367,13 +373,13 @@ def test_hedera_transfer_token_refused(backend, firmware, navigator, test_name): conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_transfer_hbar_ok(backend, firmware, navigator, test_name): +def test_hedera_transfer_hbar_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_transfer_hbar_conf( sender_shardNum=57, @@ -394,10 +400,10 @@ def test_hedera_transfer_hbar_ok(backend, firmware, navigator, test_name): memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_transfer_hbar_refused(backend, firmware, navigator, test_name): +def test_hedera_transfer_hbar_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_transfer_hbar_conf( sender_shardNum=57, @@ -419,13 +425,13 @@ def test_hedera_transfer_hbar_refused(backend, firmware, navigator, test_name): conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_token_associate_ok(backend, firmware, navigator, test_name): +def test_hedera_token_associate_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_associate_conf( token_shardNum=57, @@ -445,10 +451,10 @@ def test_hedera_token_associate_ok(backend, firmware, navigator, test_name): memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_token_associate_refused(backend, firmware, navigator, test_name): +def test_hedera_token_associate_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_associate_conf( token_shardNum=57, @@ -469,13 +475,13 @@ def test_hedera_token_associate_refused(backend, firmware, navigator, test_name) conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_token_dissociate_ok(backend, firmware, navigator, test_name): +def test_hedera_token_dissociate_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_dissociate_conf( token_shardNum=57, @@ -495,10 +501,10 @@ def test_hedera_token_dissociate_ok(backend, firmware, navigator, test_name): memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_token_dissociate_refused(backend, firmware, navigator, test_name): +def test_hedera_token_dissociate_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_dissociate_conf( token_shardNum=57, @@ -519,13 +525,13 @@ def test_hedera_token_dissociate_refused(backend, firmware, navigator, test_name conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_token_burn_ok(backend, firmware, navigator, test_name): +def test_hedera_token_burn_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_burn_conf( token_shardNum=57, token_realmNum=58, token_tokenNum=59, amount=77 @@ -540,10 +546,10 @@ def test_hedera_token_burn_ok(backend, firmware, navigator, test_name): memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_token_burn_refused(backend, firmware, navigator, test_name): +def test_hedera_token_burn_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_burn_conf( token_shardNum=57, token_realmNum=58, token_tokenNum=59, amount=77 @@ -559,13 +565,13 @@ def test_hedera_token_burn_refused(backend, firmware, navigator, test_name): conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_token_mint_ok(backend, firmware, navigator, test_name): +def test_hedera_token_mint_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_mint_conf( token_shardNum=57, token_realmNum=58, token_tokenNum=59, amount=77 @@ -580,10 +586,10 @@ def test_hedera_token_mint_ok(backend, firmware, navigator, test_name): memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_token_mint_refused(backend, firmware, navigator, test_name): +def test_hedera_token_mint_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = token_mint_conf( token_shardNum=57, token_realmNum=58, token_tokenNum=59, amount=77 @@ -599,13 +605,13 @@ def test_hedera_token_mint_refused(backend, firmware, navigator, test_name): conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED -def test_hedera_transfer_verify_ok(backend, firmware, navigator, test_name): +def test_hedera_transfer_verify_ok(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_transfer_verify( sender_shardNum=57, sender_realmNum=58, sender_accountNum=59 @@ -620,10 +626,10 @@ def test_hedera_transfer_verify_ok(backend, firmware, navigator, test_name): memo="this_is_the_memo", conf=conf, ): - navigation_helper_confirm(navigator, firmware.device, test_name) + navigation_helper_confirm(firmware, scenario_navigator) -def test_hedera_transfer_verify_refused(backend, firmware, navigator, test_name): +def test_hedera_transfer_verify_refused(backend, firmware, scenario_navigator): hedera = HederaClient(backend) conf = crypto_transfer_verify( sender_shardNum=57, sender_realmNum=58, sender_accountNum=59 @@ -639,7 +645,7 @@ def test_hedera_transfer_verify_refused(backend, firmware, navigator, test_name) conf=conf, ): backend.raise_policy = RaisePolicy.RAISE_NOTHING - navigation_helper_reject(navigator, firmware.device, test_name) + navigation_helper_reject(firmware, scenario_navigator) rapdu = hedera.get_async_response() assert rapdu.status == ErrorType.EXCEPTION_USER_REJECTED diff --git a/tests/usage.md b/tests/usage.md index be8890f..201d146 100644 --- a/tests/usage.md +++ b/tests/usage.md @@ -20,7 +20,7 @@ You can use for this the container `ghcr.io/ledgerhq/ledger-app-builder/ledger-a docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest cd # replace with the name of your app, (eg boilerplate) docker run --user "$(id -u)":"$(id -g)" --rm -ti -v "$(realpath .):/app" --privileged -v "/dev/bus/usb:/dev/bus/usb" ledger-app-builder-lite:latest -make clean && make BOLOS_SDK=$_SDK # replace with one of [NANOS, NANOX, NANOSP, STAX] +make clean && make BOLOS_SDK=$_SDK # replace with one of [NANOS, NANOX, NANOSP, STAX, FLEX] exit ``` @@ -41,7 +41,7 @@ You can use for this the container `ghcr.io/ledgerhq/ledger-app-builder/ledger-a docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest cd app-/ # replace with the name of your app, (eg boilerplate) docker run --user "$(id -u)":"$(id -g)" --rm -ti -v "$(realpath .):/app" --privileged -v "/dev/bus/usb:/dev/bus/usb" ledger-app-builder-lite:latest -make clean && make BOLOS_SDK=$_SDK load # replace with one of [NANOS, NANOX, NANOSP, STAX] +make clean && make BOLOS_SDK=$_SDK load # replace with one of [NANOS, NANOX, NANOSP, STAX, FLEX] exit ``` @@ -65,7 +65,7 @@ Standard useful pytest options Custom pytest options ``` - --device run the test on the specified device [nanos,nanox,nanosp,stax,all]. This parameter is mandatory + --device run the test on the specified device [nanos,nanox,nanosp,stax,flex,all]. This parameter is mandatory --backend run the tests against the backend [speculos, ledgercomm, ledgerwallet]. Speculos is the default --display on Speculos, enables the display of the app screen using QT --golden_run on Speculos, screen comparison functions will save the current screen instead of comparing diff --git a/tests/utils.py b/tests/utils.py index be43651..a776d2b 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,37 +1,19 @@ from pathlib import Path -from ragger.navigator import NavInsID +from ragger.firmware import Firmware + ROOT_SCREENSHOT_PATH = Path(__file__).parent.resolve() -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 = "Confirm" - else: - if device_name == "nanos": - text = "Deny" - else: - text = "Reject" +def navigation_helper_confirm(firmware, scenario_navigator): + if firmware.is_nano: + scenario_navigator.review_approve(custom_screen_text="Confirm") else: - navigate_instruction = NavInsID.USE_CASE_REVIEW_TAP - if accept: - validation_instructions = [NavInsID.USE_CASE_REVIEW_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS] - text = "Hold to sign" - else: - validation_instructions = [NavInsID.USE_CASE_REVIEW_REJECT, NavInsID.USE_CASE_CHOICE_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS] - text = "Hold to sign" - - - navigator.navigate_until_text_and_compare(navigate_instruction, - validation_instructions, - text, - ROOT_SCREENSHOT_PATH, - snapshots_name) + scenario_navigator.review_approve() -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) +def navigation_helper_reject(firmware, scenario_navigator): + if firmware is Firmware.NANOS: + scenario_navigator.review_reject(custom_screen_text="Deny") + elif firmware.is_nano: + scenario_navigator.review_reject(custom_screen_text="Reject") + else: + scenario_navigator.review_reject() \ No newline at end of file