diff --git a/Makefile b/Makefile index 4cf88bf..c850adc 100755 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ APP_LOAD_PARAMS= --curve secp256k1 $(COMMON_LOAD_PARAMS) APPVERSION_M=1 APPVERSION_N=3 -APPVERSION_P=0 +APPVERSION_P=1 APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) # Celo diff --git a/glyphs/celo_64px.gif b/glyphs/celo_64px.gif index 2cd945c..b61f5f4 100644 Binary files a/glyphs/celo_64px.gif and b/glyphs/celo_64px.gif differ diff --git a/src/main.c b/src/main.c index 226d72c..c8c03b6 100644 --- a/src/main.c +++ b/src/main.c @@ -849,7 +849,7 @@ __attribute__((section(".boot"))) int main(void) { if (N_storage.initialized != 0x01) { internalStorage_t storage; - storage.dataAllowed = 0x01; + storage.dataAllowed = 0x00; storage.contractDetails = 0x00; storage.initialized = 0x01; nvm_write(&N_storage, (void*)&storage, sizeof(internalStorage_t)); diff --git a/tests/python/apps/celo.py b/tests/python/apps/celo.py index 079df55..896b7cc 100644 --- a/tests/python/apps/celo.py +++ b/tests/python/apps/celo.py @@ -24,7 +24,7 @@ class INS(IntEnum): class StatusCode(IntEnum): STATUS_OK = 0x9000 STATUS_DEPRECATED = 0x6501 - + STATUS_ERROR_IN_DATA = 0x6A80 class Param(IntEnum): P1_DirectlyFetchAddress = 0x00 # Return address directly from the wallet diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00000.png b/tests/python/snapshots/flex/test_celo_derive_address/00000.png index b43dda0..3c5f5e0 100644 Binary files a/tests/python/snapshots/flex/test_celo_derive_address/00000.png and b/tests/python/snapshots/flex/test_celo_derive_address/00000.png differ diff --git a/tests/python/snapshots/flex/test_celo_derive_address/00005.png b/tests/python/snapshots/flex/test_celo_derive_address/00005.png index 98ebcfe..b174685 100644 Binary files a/tests/python/snapshots/flex/test_celo_derive_address/00005.png and b/tests/python/snapshots/flex/test_celo_derive_address/00005.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00000.png b/tests/python/snapshots/flex/test_sign_data/00000.png index 3cbed78..40bc550 100644 Binary files a/tests/python/snapshots/flex/test_sign_data/00000.png and b/tests/python/snapshots/flex/test_sign_data/00000.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00001.png b/tests/python/snapshots/flex/test_sign_data/00001.png index 29e5d9b..2f1d84c 100644 Binary files a/tests/python/snapshots/flex/test_sign_data/00001.png and b/tests/python/snapshots/flex/test_sign_data/00001.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00002.png b/tests/python/snapshots/flex/test_sign_data/00002.png index 9f5657a..b8660cf 100644 Binary files a/tests/python/snapshots/flex/test_sign_data/00002.png and b/tests/python/snapshots/flex/test_sign_data/00002.png differ diff --git a/tests/python/snapshots/flex/test_sign_data/00004.png b/tests/python/snapshots/flex/test_sign_data/00004.png index 98ebcfe..b174685 100644 Binary files a/tests/python/snapshots/flex/test_sign_data/00004.png and b/tests/python/snapshots/flex/test_sign_data/00004.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00000.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00000.png index 0a24b22..36b9a9b 100644 Binary files a/tests/python/snapshots/flex/test_sign_transaction_cip64/00000.png and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00000.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00001.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00001.png index 852ebd3..70a6e6e 100644 Binary files a/tests/python/snapshots/flex/test_sign_transaction_cip64/00001.png and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00001.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00002.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00002.png index 361fa53..9d8e493 100644 Binary files a/tests/python/snapshots/flex/test_sign_transaction_cip64/00002.png and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00002.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_cip64/00004.png b/tests/python/snapshots/flex/test_sign_transaction_cip64/00004.png index 98ebcfe..b174685 100644 Binary files a/tests/python/snapshots/flex/test_sign_transaction_cip64/00004.png and b/tests/python/snapshots/flex/test_sign_transaction_cip64/00004.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559/00000.png deleted file mode 100644 index 564d6c0..0000000 Binary files a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00000.png and /dev/null differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index ebed3ec..0000000 Binary files a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559/00002.png deleted file mode 100644 index 31c86fe..0000000 Binary files a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00002.png and /dev/null differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index 9b4d36c..0000000 Binary files a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559/00005.png deleted file mode 100644 index 98ebcfe..0000000 Binary files a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00005.png and /dev/null differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00000.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00000.png new file mode 100644 index 0000000..36b9a9b Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00000.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00001.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00001.png new file mode 100644 index 0000000..c962f67 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00001.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..9d8e493 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00003.png similarity index 100% rename from tests/python/snapshots/flex/test_sign_transaction_eip1559/00004.png rename to tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00003.png diff --git a/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00004.png b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00004.png new file mode 100644 index 0000000..b174685 Binary files /dev/null and b/tests/python/snapshots/flex/test_sign_transaction_eip1559_no_data/00004.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 5adfa7b..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index ca25a81..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00004.png deleted file mode 100644 index 0b16c59..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00004.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00005.png deleted file mode 100644 index dfdb1c4..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00005.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00006.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00006.png deleted file mode 100644 index 0130ea2..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00006.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00007.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00007.png deleted file mode 100644 index 44f0d51..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00007.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00008.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00008.png deleted file mode 100644 index 42924db..0000000 Binary files a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00008.png and /dev/null differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00000.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00000.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00000.png diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00001.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00002.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00001.png diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..e5e9945 Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..455b7fb Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00004.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00004.png new file mode 100644 index 0000000..01165c8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00004.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00005.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00005.png new file mode 100644 index 0000000..e3bb2ad Binary files /dev/null and b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00005.png differ diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00009.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00006.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00009.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00006.png diff --git a/tests/python/snapshots/nanos/test_sign_transaction_eip1559/00010.png b/tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00007.png similarity index 100% rename from tests/python/snapshots/nanos/test_sign_transaction_eip1559/00010.png rename to tests/python/snapshots/nanos/test_sign_transaction_eip1559_no_data/00007.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 8fc8955..0000000 Binary files a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index 5693d0e..0000000 Binary files a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00004.png deleted file mode 100644 index b29ef0c..0000000 Binary files a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00004.png and /dev/null differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00000.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00000.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00000.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00001.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00002.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00001.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..9fd8cd9 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..d158d51 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00004.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00005.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00004.png diff --git a/tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00006.png b/tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00005.png similarity index 100% rename from tests/python/snapshots/nanosp/test_sign_transaction_eip1559/00006.png rename to tests/python/snapshots/nanosp/test_sign_transaction_eip1559_no_data/00005.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 8fc8955..0000000 Binary files a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index 5693d0e..0000000 Binary files a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00004.png deleted file mode 100644 index b29ef0c..0000000 Binary files a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00004.png and /dev/null differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00000.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00000.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00000.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00001.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00002.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00001.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..9fd8cd9 Binary files /dev/null and b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00003.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00003.png new file mode 100644 index 0000000..d158d51 Binary files /dev/null and b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00003.png differ diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00004.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00005.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00004.png diff --git a/tests/python/snapshots/nanox/test_sign_transaction_eip1559/00006.png b/tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00005.png similarity index 100% rename from tests/python/snapshots/nanox/test_sign_transaction_eip1559/00006.png rename to tests/python/snapshots/nanox/test_sign_transaction_eip1559_no_data/00005.png diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00000.png b/tests/python/snapshots/stax/test_celo_derive_address/00000.png index 144f75a..bfb8d13 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00000.png and b/tests/python/snapshots/stax/test_celo_derive_address/00000.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00001.png b/tests/python/snapshots/stax/test_celo_derive_address/00001.png index 00928d8..cb33abe 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00001.png and b/tests/python/snapshots/stax/test_celo_derive_address/00001.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00003.png b/tests/python/snapshots/stax/test_celo_derive_address/00003.png index 00928d8..cb33abe 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00003.png and b/tests/python/snapshots/stax/test_celo_derive_address/00003.png differ diff --git a/tests/python/snapshots/stax/test_celo_derive_address/00005.png b/tests/python/snapshots/stax/test_celo_derive_address/00005.png index edcc879..571dfa7 100644 Binary files a/tests/python/snapshots/stax/test_celo_derive_address/00005.png and b/tests/python/snapshots/stax/test_celo_derive_address/00005.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00000.png b/tests/python/snapshots/stax/test_sign_data/00000.png index ff7093c..a08ebe3 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00000.png and b/tests/python/snapshots/stax/test_sign_data/00000.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00002.png b/tests/python/snapshots/stax/test_sign_data/00002.png index 8be9f6d..c48b35c 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00002.png and b/tests/python/snapshots/stax/test_sign_data/00002.png differ diff --git a/tests/python/snapshots/stax/test_sign_data/00004.png b/tests/python/snapshots/stax/test_sign_data/00004.png index edcc879..571dfa7 100644 Binary files a/tests/python/snapshots/stax/test_sign_data/00004.png and b/tests/python/snapshots/stax/test_sign_data/00004.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png index 58ef483..f72f36e 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00000.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png index 0b31f76..da02a30 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00002.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png b/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png index edcc879..571dfa7 100644 Binary files a/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png and b/tests/python/snapshots/stax/test_sign_transaction_cip64/00004.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00000.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00000.png deleted file mode 100644 index e85f35a..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00000.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00001.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00001.png deleted file mode 100644 index 1938eab..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00001.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00002.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00002.png deleted file mode 100644 index 368397c..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00002.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00003.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00003.png deleted file mode 100644 index fb6ac54..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00003.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00005.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559/00005.png deleted file mode 100644 index edcc879..0000000 Binary files a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00005.png and /dev/null differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00000.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00000.png new file mode 100644 index 0000000..f72f36e Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00000.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00001.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00001.png new file mode 100644 index 0000000..85aaafb Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00001.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00002.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00002.png new file mode 100644 index 0000000..da02a30 Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00002.png differ diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559/00004.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00003.png similarity index 100% rename from tests/python/snapshots/stax/test_sign_transaction_eip1559/00004.png rename to tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00003.png diff --git a/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00004.png b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00004.png new file mode 100644 index 0000000..571dfa7 Binary files /dev/null and b/tests/python/snapshots/stax/test_sign_transaction_eip1559_no_data/00004.png differ diff --git a/tests/python/test_sign_new_transaction.py b/tests/python/test_sign_new_transaction.py index bee4624..3382e35 100644 --- a/tests/python/test_sign_new_transaction.py +++ b/tests/python/test_sign_new_transaction.py @@ -22,19 +22,30 @@ def sign_transaction_with_rawTx(test_name, backend, navigator, instructions, raw navigator.navigate_and_compare(TESTS_ROOT_DIR, test_name, instructions) response: bytes = get_async_response(backend) + return response.status - assert (response.status == StatusCode.STATUS_OK) - -def test_sign_transaction_eip1559(test_name, backend, firmware, navigator): +def test_sign_transaction_eip1559_no_data(test_name, backend, firmware, navigator): if firmware.device == "nanos": - instructions = get_nano_review_instructions(9) + instructions = get_nano_review_instructions(6) elif firmware.device.startswith("nano"): - instructions = get_nano_review_instructions(5) + instructions = get_nano_review_instructions(4) else: - instructions = get_stax_review_instructions_with_warning(1) + instructions = get_stax_review_instructions(1) + + rawTx = "02f86c82aef380830f42408506fc35fb8082520894da52c9ffebd4d54c94a072776126069d43e74f9e8080c080a099059ce0f1fe1f4fe27a583a6fd6a12274780d358f332d6e5901953900b8fb22a046ce6d625369fdc8a521c22793d188afbf61500cd3095fc09b761b518560f101" + status = sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) + assert(status == StatusCode.STATUS_OK) + +def test_sign_transaction_eip1559_with_data(test_name, backend, firmware): rawTx = "02f8d482a4ec820808839b34b4850fbc63d144830204e094004626a008b1acdc4c74ab51644093b155e59a2380b864ba0876520000000000000000000000000000000000000000000000009458660c5b865f23000000000000000000000000e3b72489968f11c15282514f33df24634440393f000000000000000000000000e3b72489968f11c15282514f33df24634440393fc001a0b0799073a2aa771c5e32b88933ff19982dc30f9e4523fde47137ae504793b880a07014a6e3c32a3b34d4118beb298f2200e858599b5e97766dfaa6fea192cde993" - sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) + celo = CeloClient(backend) + with pytest.raises(Exception) as exc_info: # Expecting the test to fail + with celo.sign_transaction_with_rawTx_async(ETH_PACKED_DERIVATION_PATH, rawTx): + pass + assert "6a80" in str(exc_info.value), "Expected exception to contain '6a80'" + + def test_add_cUSD_as_fee_currency(test_name, backend, navigator): celo = CeloClient(backend) @@ -47,7 +58,6 @@ def test_add_cUSD_as_fee_currency(test_name, backend, navigator): pass response: bytes = get_async_response(backend) - assert (response.status == StatusCode.STATUS_OK) def test_sign_transaction_cip64(test_name, backend, firmware, navigator): @@ -61,4 +71,5 @@ def test_sign_transaction_cip64(test_name, backend, firmware, navigator): instructions = get_stax_review_instructions(1) rawTx = "7bf84382a4ec8084773594008503a11f9db58301688c94da52c9ffebd4d54c94a072776126069d43e74f9e8080c094765DE816845861E75A25FCA122BB6898B8B1282A018080" - sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) \ No newline at end of file + status = sign_transaction_with_rawTx(test_name, backend, navigator, instructions, rawTx) + assert(status == StatusCode.STATUS_OK) \ No newline at end of file