diff --git a/src/shared_context.h b/src/shared_context.h index eca0fed11..eaac84fb0 100644 --- a/src/shared_context.h +++ b/src/shared_context.h @@ -131,6 +131,7 @@ typedef struct txStringProperties_s { char maxFee[50]; char nonce[8]; // 10M tx per account ought to be enough for everybody char network_name[NETWORK_STRING_MAX_SIZE + 1]; + char tx_hash[2 + (INT256_LENGTH * 2) + 1]; } txStringProperties_t; #ifdef TARGET_NANOS diff --git a/src_bagl/ui_flow_signTx.c b/src_bagl/ui_flow_signTx.c index 1ff7a1901..2218cf44c 100644 --- a/src_bagl/ui_flow_signTx.c +++ b/src_bagl/ui_flow_signTx.c @@ -120,7 +120,7 @@ UX_STEP_NOCB(ux_approval_tx_hash_step, #else .title = "Transaction hash", #endif - .text = strings.common.fullAmount + .text = strings.common.tx_hash }); UX_STEP_NOCB( ux_approval_amount_step, @@ -249,8 +249,8 @@ void ux_approve_tx(bool fromPlugin) { } else { if (tmpContent.txContent.dataPresent) { #pragma GCC diagnostic ignored "-Wformat" - snprintf(strings.common.fullAmount, - sizeof(strings.common.fullAmount), + snprintf(strings.common.tx_hash, + sizeof(strings.common.tx_hash), "0x%.*h", sizeof(tmpCtx.transactionContext.hash), tmpCtx.transactionContext.hash); @@ -261,7 +261,8 @@ void ux_approve_tx(bool fromPlugin) { if (strings.common.fromAddress[0] != 0) { ux_approval_tx_flow[step++] = &ux_approval_from_step; } - if (!tmpContent.txContent.dataPresent) { + if (!tmpContent.txContent.dataPresent || + !allzeroes(tmpContent.txContent.value.value, tmpContent.txContent.value.length)) { ux_approval_tx_flow[step++] = &ux_approval_amount_step; } #ifdef HAVE_TRUSTED_NAME diff --git a/src_nbgl/ui_approve_tx.c b/src_nbgl/ui_approve_tx.c index 19d70baa8..6431218b9 100644 --- a/src_nbgl/ui_approve_tx.c +++ b/src_nbgl/ui_approve_tx.c @@ -122,14 +122,14 @@ static uint8_t setTagValuePairs(void) { } else { if (tmpContent.txContent.dataPresent) { #pragma GCC diagnostic ignored "-Wformat" - snprintf(strings.common.fullAmount, - sizeof(strings.common.fullAmount), + snprintf(strings.common.tx_hash, + sizeof(strings.common.tx_hash), "0x%.*h", sizeof(tmpCtx.transactionContext.hash), tmpCtx.transactionContext.hash); #pragma GCC diagnostic warning "-Wformat" pairs[nbPairs].item = "Transaction hash"; - pairs[nbPairs].value = strings.common.fullAmount; + pairs[nbPairs].value = strings.common.tx_hash; nbPairs++; } @@ -139,7 +139,8 @@ static uint8_t setTagValuePairs(void) { nbPairs++; } - if (!tmpContent.txContent.dataPresent) { + if (!tmpContent.txContent.dataPresent || + !allzeroes(tmpContent.txContent.value.value, tmpContent.txContent.value.length)) { pairs[nbPairs].item = "Amount"; pairs[nbPairs].value = strings.common.fullAmount; nbPairs++; diff --git a/tests/ragger/snapshots/flex/test_blind_sign_signed/00000.png b/tests/ragger/snapshots/flex/test_blind_sign/00000.png similarity index 100% rename from tests/ragger/snapshots/flex/test_blind_sign_signed/00000.png rename to tests/ragger/snapshots/flex/test_blind_sign/00000.png diff --git a/tests/ragger/snapshots/flex/test_blind_sign_signed/00001.png b/tests/ragger/snapshots/flex/test_blind_sign/00001.png similarity index 100% rename from tests/ragger/snapshots/flex/test_blind_sign_signed/00001.png rename to tests/ragger/snapshots/flex/test_blind_sign/00001.png diff --git a/tests/ragger/snapshots/flex/test_blind_sign/00002.png b/tests/ragger/snapshots/flex/test_blind_sign/00002.png new file mode 100644 index 000000000..e903fe835 Binary files /dev/null and b/tests/ragger/snapshots/flex/test_blind_sign/00002.png differ diff --git a/tests/ragger/snapshots/flex/test_blind_sign_signed/00003.png b/tests/ragger/snapshots/flex/test_blind_sign/00003.png similarity index 100% rename from tests/ragger/snapshots/flex/test_blind_sign_signed/00003.png rename to tests/ragger/snapshots/flex/test_blind_sign/00003.png diff --git a/tests/ragger/snapshots/flex/test_blind_sign_signed/00004.png b/tests/ragger/snapshots/flex/test_blind_sign/00004.png similarity index 100% rename from tests/ragger/snapshots/flex/test_blind_sign_signed/00004.png rename to tests/ragger/snapshots/flex/test_blind_sign/00004.png diff --git a/tests/ragger/snapshots/flex/test_blind_sign_signed/00005.png b/tests/ragger/snapshots/flex/test_blind_sign/00005.png similarity index 100% rename from tests/ragger/snapshots/flex/test_blind_sign_signed/00005.png rename to tests/ragger/snapshots/flex/test_blind_sign/00005.png diff --git a/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00000.png b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00000.png new file mode 100644 index 000000000..acbb161df Binary files /dev/null and b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00000.png differ diff --git a/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00001.png b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00001.png new file mode 100644 index 000000000..a36989ec6 Binary files /dev/null and b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00001.png differ diff --git a/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00002.png b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00002.png new file mode 100644 index 000000000..3119953c6 Binary files /dev/null and b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00002.png differ diff --git a/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00003.png b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00003.png new file mode 100644 index 000000000..cb8ab9f82 Binary files /dev/null and b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00003.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00013.png b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00004.png similarity index 100% rename from tests/ragger/snapshots/flex/test_sign_parameter_selector/00013.png rename to tests/ragger/snapshots/flex/test_blind_sign_nonzero/00004.png diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00014.png b/tests/ragger/snapshots/flex/test_blind_sign_nonzero/00005.png similarity index 100% rename from tests/ragger/snapshots/flex/test_sign_parameter_selector/00014.png rename to tests/ragger/snapshots/flex/test_blind_sign_nonzero/00005.png diff --git a/tests/ragger/snapshots/flex/test_blind_sign_rejected/00002.png b/tests/ragger/snapshots/flex/test_blind_sign_rejected/00002.png index 783bb5b6d..e903fe835 100644 Binary files a/tests/ragger/snapshots/flex/test_blind_sign_rejected/00002.png and b/tests/ragger/snapshots/flex/test_blind_sign_rejected/00002.png differ diff --git a/tests/ragger/snapshots/flex/test_blind_sign_signed/00002.png b/tests/ragger/snapshots/flex/test_blind_sign_signed/00002.png deleted file mode 100644 index 783bb5b6d..000000000 Binary files a/tests/ragger/snapshots/flex/test_blind_sign_signed/00002.png and /dev/null differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00001.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00001.png index b991ceb21..60801e8a9 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00001.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00001.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00004.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00004.png index d1bf336fe..bb15d3482 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00004.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00004.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00006.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00006.png index 48fd55291..acbb161df 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00006.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00006.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00007.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00007.png index 5cf8178e8..a36989ec6 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00007.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00007.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00008.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00008.png index f030fb1b2..e903fe835 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00008.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00008.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00009.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00009.png index acbb161df..fdf1457d2 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00009.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00009.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00010.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00010.png index a36989ec6..aeb3c483d 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00010.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00010.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00011.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00011.png index 783bb5b6d..be51a9d55 100644 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00011.png and b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00011.png differ diff --git a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00012.png b/tests/ragger/snapshots/flex/test_sign_parameter_selector/00012.png deleted file mode 100644 index fdf1457d2..000000000 Binary files a/tests/ragger/snapshots/flex/test_sign_parameter_selector/00012.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00000.png b/tests/ragger/snapshots/nanos/test_blind_sign/00000.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00000.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00000.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00001.png b/tests/ragger/snapshots/nanos/test_blind_sign/00001.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00001.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00001.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign/00002.png b/tests/ragger/snapshots/nanos/test_blind_sign/00002.png new file mode 100644 index 000000000..987e93bcf Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign/00002.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign/00003.png b/tests/ragger/snapshots/nanos/test_blind_sign/00003.png new file mode 100644 index 000000000..30cfdd378 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign/00003.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign/00004.png b/tests/ragger/snapshots/nanos/test_blind_sign/00004.png new file mode 100644 index 000000000..589b02817 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign/00004.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign/00005.png b/tests/ragger/snapshots/nanos/test_blind_sign/00005.png new file mode 100644 index 000000000..32c229fa1 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign/00005.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00006.png b/tests/ragger/snapshots/nanos/test_blind_sign/00006.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00006.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00006.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00007.png b/tests/ragger/snapshots/nanos/test_blind_sign/00007.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00007.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00007.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00008.png b/tests/ragger/snapshots/nanos/test_blind_sign/00008.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00008.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00008.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00009.png b/tests/ragger/snapshots/nanos/test_blind_sign/00009.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00009.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00009.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00010.png b/tests/ragger/snapshots/nanos/test_blind_sign/00010.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00010.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00010.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00011.png b/tests/ragger/snapshots/nanos/test_blind_sign/00011.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00011.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00011.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00012.png b/tests/ragger/snapshots/nanos/test_blind_sign/00012.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00012.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00012.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00013.png b/tests/ragger/snapshots/nanos/test_blind_sign/00013.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00013.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00013.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00014.png b/tests/ragger/snapshots/nanos/test_blind_sign/00014.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_blind_sign_signed/00014.png rename to tests/ragger/snapshots/nanos/test_blind_sign/00014.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00000.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00000.png new file mode 100644 index 000000000..54ae35404 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00000.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00001.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00001.png new file mode 100644 index 000000000..8d84cc70f Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00001.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00002.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00002.png new file mode 100644 index 000000000..78312e204 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00002.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00003.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00003.png new file mode 100644 index 000000000..a18d8a3eb Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00003.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00004.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00004.png new file mode 100644 index 000000000..1a10e1ff0 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00004.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00005.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00005.png new file mode 100644 index 000000000..b6ae4c3a2 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00005.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00006.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00006.png new file mode 100644 index 000000000..0a6a82343 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00006.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00007.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00007.png new file mode 100644 index 000000000..04f6b02d7 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00007.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00008.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00008.png new file mode 100644 index 000000000..8a8c617ae Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00008.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00009.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00009.png new file mode 100644 index 000000000..95c650937 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00009.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00010.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00010.png new file mode 100644 index 000000000..424902998 Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00010.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00011.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00011.png new file mode 100644 index 000000000..bb4b73f5c Binary files /dev/null and b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00011.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00023.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00012.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_sign_parameter_selector/00023.png rename to tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00012.png diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00024.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00013.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_sign_parameter_selector/00024.png rename to tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00013.png diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00025.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00014.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_sign_parameter_selector/00025.png rename to tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00014.png diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00026.png b/tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00015.png similarity index 100% rename from tests/ragger/snapshots/nanos/test_sign_parameter_selector/00026.png rename to tests/ragger/snapshots/nanos/test_blind_sign_nonzero/00015.png diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00002.png b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00002.png index a6dd2f97d..987e93bcf 100644 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00002.png and b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00002.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00003.png b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00003.png index c26bc5381..30cfdd378 100644 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00003.png and b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00003.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00004.png b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00004.png index 1c82aa59f..589b02817 100644 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00004.png and b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00004.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00005.png b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00005.png index 54014a23c..32c229fa1 100644 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00005.png and b/tests/ragger/snapshots/nanos/test_blind_sign_rejected/00005.png differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00002.png b/tests/ragger/snapshots/nanos/test_blind_sign_signed/00002.png deleted file mode 100644 index a6dd2f97d..000000000 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00002.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00003.png b/tests/ragger/snapshots/nanos/test_blind_sign_signed/00003.png deleted file mode 100644 index c26bc5381..000000000 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00003.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00004.png b/tests/ragger/snapshots/nanos/test_blind_sign_signed/00004.png deleted file mode 100644 index 1c82aa59f..000000000 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00004.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00005.png b/tests/ragger/snapshots/nanos/test_blind_sign_signed/00005.png deleted file mode 100644 index 54014a23c..000000000 Binary files a/tests/ragger/snapshots/nanos/test_blind_sign_signed/00005.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00001.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00001.png index a86ceb03d..ce6e80268 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00001.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00001.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00004.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00004.png index 5b0786580..3cedab6aa 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00004.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00004.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00005.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00005.png index 12d3fb1a0..c187fa6b1 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00005.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00005.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00006.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00006.png index 37063fdfa..fa46f9012 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00006.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00006.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00008.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00008.png index f6e9b1ff6..54ae35404 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00008.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00008.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00009.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00009.png index 6f079b7ff..8d84cc70f 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00009.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00009.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00010.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00010.png index a283d7806..987e93bcf 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00010.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00010.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00011.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00011.png index 66c411c2e..30cfdd378 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00011.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00011.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00012.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00012.png index 54ae35404..589b02817 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00012.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00012.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00013.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00013.png index 8d84cc70f..32c229fa1 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00013.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00013.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00014.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00014.png index a6dd2f97d..0a6a82343 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00014.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00014.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00015.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00015.png index c26bc5381..04f6b02d7 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00015.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00015.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00016.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00016.png index 1c82aa59f..8a8c617ae 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00016.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00016.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00017.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00017.png index 54014a23c..424902998 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00017.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00017.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00018.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00018.png index 0a6a82343..bb4b73f5c 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00018.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00018.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00019.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00019.png index 04f6b02d7..b7a5302cd 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00019.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00019.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00020.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00020.png index 8a8c617ae..cc968dc82 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00020.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00020.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00021.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00021.png index 424902998..861f858ef 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00021.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00021.png differ diff --git a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00022.png b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00022.png index bb4b73f5c..ce795f34e 100644 Binary files a/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00022.png and b/tests/ragger/snapshots/nanos/test_sign_parameter_selector/00022.png differ diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00000.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00000.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_blind_sign_signed/00000.png rename to tests/ragger/snapshots/nanosp/test_blind_sign/00000.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00001.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00001.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_blind_sign_signed/00001.png rename to tests/ragger/snapshots/nanosp/test_blind_sign/00001.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign/00002.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00002.png new file mode 100644 index 000000000..6fd3376cd Binary files /dev/null and b/tests/ragger/snapshots/nanosp/test_blind_sign/00002.png differ diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign/00003.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00003.png new file mode 100644 index 000000000..4bc1c688f Binary files /dev/null and b/tests/ragger/snapshots/nanosp/test_blind_sign/00003.png differ diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00004.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00004.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_blind_sign_signed/00004.png rename to tests/ragger/snapshots/nanosp/test_blind_sign/00004.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00005.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00005.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_blind_sign_signed/00005.png rename to tests/ragger/snapshots/nanosp/test_blind_sign/00005.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00006.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00006.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_blind_sign_signed/00006.png rename to tests/ragger/snapshots/nanosp/test_blind_sign/00006.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00007.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00007.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_blind_sign_signed/00007.png rename to tests/ragger/snapshots/nanosp/test_blind_sign/00007.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00008.png b/tests/ragger/snapshots/nanosp/test_blind_sign/00008.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_blind_sign_signed/00008.png rename to tests/ragger/snapshots/nanosp/test_blind_sign/00008.png diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00000.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00000.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_blind_sign_signed/00000.png rename to tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00000.png diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00001.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00001.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_blind_sign_signed/00001.png rename to tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00001.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00002.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00002.png new file mode 100644 index 000000000..447ac9381 Binary files /dev/null and b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00002.png differ diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00003.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00003.png new file mode 100644 index 000000000..e2e01b902 Binary files /dev/null and b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00003.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00004.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00004.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_blind_sign_signed/00004.png rename to tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00004.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00005.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00005.png new file mode 100644 index 000000000..4e3516cba Binary files /dev/null and b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00005.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00005.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00006.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_blind_sign_signed/00005.png rename to tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00006.png diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00015.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00007.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00015.png rename to tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00007.png diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00016.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00008.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00016.png rename to tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00008.png diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00017.png b/tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00009.png similarity index 100% rename from tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00017.png rename to tests/ragger/snapshots/nanosp/test_blind_sign_nonzero/00009.png diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00002.png b/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00002.png index 07995577f..6fd3376cd 100644 Binary files a/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00002.png and b/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00002.png differ diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00003.png b/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00003.png index 5ba4dadb0..4bc1c688f 100644 Binary files a/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00003.png and b/tests/ragger/snapshots/nanosp/test_blind_sign_rejected/00003.png differ diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00002.png b/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00002.png deleted file mode 100644 index 07995577f..000000000 Binary files a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00002.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00003.png b/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00003.png deleted file mode 100644 index 5ba4dadb0..000000000 Binary files a/tests/ragger/snapshots/nanosp/test_blind_sign_signed/00003.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00001.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00001.png index 293eb07be..a0a9e5a62 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00001.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00001.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00004.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00004.png index 953ecc759..c980cbfc1 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00004.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00004.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00006.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00006.png index ecb060ce3..d1a0dc395 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00006.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00006.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00007.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00007.png index 6fd3a5e61..487ea10fc 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00007.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00007.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00008.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00008.png index 53ae65195..6fd3376cd 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00008.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00008.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00009.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00009.png index d1a0dc395..4bc1c688f 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00009.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00009.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00010.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00010.png index 487ea10fc..1ac2ab077 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00010.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00010.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00011.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00011.png index 07995577f..d704566c0 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00011.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00011.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00012.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00012.png index 5ba4dadb0..4eaf73596 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00012.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00012.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00013.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00013.png index 1ac2ab077..c753939d8 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00013.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00013.png differ diff --git a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00014.png b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00014.png index d704566c0..a58590b98 100644 Binary files a/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00014.png and b/tests/ragger/snapshots/nanosp/test_sign_parameter_selector/00014.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign/00000.png b/tests/ragger/snapshots/nanox/test_blind_sign/00000.png new file mode 100644 index 000000000..d1a0dc395 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign/00000.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign/00001.png b/tests/ragger/snapshots/nanox/test_blind_sign/00001.png new file mode 100644 index 000000000..487ea10fc Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign/00001.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign/00002.png b/tests/ragger/snapshots/nanox/test_blind_sign/00002.png new file mode 100644 index 000000000..6fd3376cd Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign/00002.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign/00003.png b/tests/ragger/snapshots/nanox/test_blind_sign/00003.png new file mode 100644 index 000000000..4bc1c688f Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign/00003.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign/00004.png b/tests/ragger/snapshots/nanox/test_blind_sign/00004.png new file mode 100644 index 000000000..1ac2ab077 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign/00004.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign/00005.png b/tests/ragger/snapshots/nanox/test_blind_sign/00005.png new file mode 100644 index 000000000..d704566c0 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign/00005.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00006.png b/tests/ragger/snapshots/nanox/test_blind_sign/00006.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_blind_sign_signed/00006.png rename to tests/ragger/snapshots/nanox/test_blind_sign/00006.png diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00007.png b/tests/ragger/snapshots/nanox/test_blind_sign/00007.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_blind_sign_signed/00007.png rename to tests/ragger/snapshots/nanox/test_blind_sign/00007.png diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00008.png b/tests/ragger/snapshots/nanox/test_blind_sign/00008.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_blind_sign_signed/00008.png rename to tests/ragger/snapshots/nanox/test_blind_sign/00008.png diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00000.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00000.png new file mode 100644 index 000000000..d1a0dc395 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00000.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00001.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00001.png new file mode 100644 index 000000000..487ea10fc Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00001.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00002.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00002.png new file mode 100644 index 000000000..447ac9381 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00002.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00003.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00003.png new file mode 100644 index 000000000..e2e01b902 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00003.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00004.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00004.png new file mode 100644 index 000000000..1ac2ab077 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00004.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00005.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00005.png new file mode 100644 index 000000000..4e3516cba Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00005.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00006.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00006.png new file mode 100644 index 000000000..d704566c0 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00006.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00015.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00007.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_sign_parameter_selector/00015.png rename to tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00007.png diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00016.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00008.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_sign_parameter_selector/00016.png rename to tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00008.png diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00017.png b/tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00009.png similarity index 100% rename from tests/ragger/snapshots/nanox/test_sign_parameter_selector/00017.png rename to tests/ragger/snapshots/nanox/test_blind_sign_nonzero/00009.png diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00002.png b/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00002.png index 07995577f..6fd3376cd 100644 Binary files a/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00002.png and b/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00002.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00003.png b/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00003.png index 5ba4dadb0..4bc1c688f 100644 Binary files a/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00003.png and b/tests/ragger/snapshots/nanox/test_blind_sign_rejected/00003.png differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00002.png b/tests/ragger/snapshots/nanox/test_blind_sign_signed/00002.png deleted file mode 100644 index 07995577f..000000000 Binary files a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00002.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00003.png b/tests/ragger/snapshots/nanox/test_blind_sign_signed/00003.png deleted file mode 100644 index 5ba4dadb0..000000000 Binary files a/tests/ragger/snapshots/nanox/test_blind_sign_signed/00003.png and /dev/null differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00001.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00001.png index 293eb07be..a0a9e5a62 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00001.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00001.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00004.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00004.png index 953ecc759..c980cbfc1 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00004.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00004.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00006.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00006.png index ecb060ce3..d1a0dc395 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00006.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00006.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00007.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00007.png index 6fd3a5e61..487ea10fc 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00007.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00007.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00008.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00008.png index 53ae65195..6fd3376cd 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00008.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00008.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00009.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00009.png index d1a0dc395..4bc1c688f 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00009.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00009.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00010.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00010.png index 487ea10fc..1ac2ab077 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00010.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00010.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00011.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00011.png index 07995577f..d704566c0 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00011.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00011.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00012.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00012.png index 5ba4dadb0..4eaf73596 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00012.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00012.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00013.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00013.png index 1ac2ab077..c753939d8 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00013.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00013.png differ diff --git a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00014.png b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00014.png index d704566c0..a58590b98 100644 Binary files a/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00014.png and b/tests/ragger/snapshots/nanox/test_sign_parameter_selector/00014.png differ diff --git a/tests/ragger/snapshots/stax/test_blind_sign_signed/00000.png b/tests/ragger/snapshots/stax/test_blind_sign/00000.png similarity index 100% rename from tests/ragger/snapshots/stax/test_blind_sign_signed/00000.png rename to tests/ragger/snapshots/stax/test_blind_sign/00000.png diff --git a/tests/ragger/snapshots/stax/test_blind_sign_signed/00001.png b/tests/ragger/snapshots/stax/test_blind_sign/00001.png similarity index 100% rename from tests/ragger/snapshots/stax/test_blind_sign_signed/00001.png rename to tests/ragger/snapshots/stax/test_blind_sign/00001.png diff --git a/tests/ragger/snapshots/stax/test_blind_sign/00002.png b/tests/ragger/snapshots/stax/test_blind_sign/00002.png new file mode 100644 index 000000000..1898206ed Binary files /dev/null and b/tests/ragger/snapshots/stax/test_blind_sign/00002.png differ diff --git a/tests/ragger/snapshots/stax/test_blind_sign_signed/00003.png b/tests/ragger/snapshots/stax/test_blind_sign/00003.png similarity index 100% rename from tests/ragger/snapshots/stax/test_blind_sign_signed/00003.png rename to tests/ragger/snapshots/stax/test_blind_sign/00003.png diff --git a/tests/ragger/snapshots/stax/test_blind_sign_signed/00004.png b/tests/ragger/snapshots/stax/test_blind_sign/00004.png similarity index 100% rename from tests/ragger/snapshots/stax/test_blind_sign_signed/00004.png rename to tests/ragger/snapshots/stax/test_blind_sign/00004.png diff --git a/tests/ragger/snapshots/stax/test_blind_sign_signed/00005.png b/tests/ragger/snapshots/stax/test_blind_sign/00005.png similarity index 100% rename from tests/ragger/snapshots/stax/test_blind_sign_signed/00005.png rename to tests/ragger/snapshots/stax/test_blind_sign/00005.png diff --git a/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00000.png b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00000.png new file mode 100644 index 000000000..9696ae123 Binary files /dev/null and b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00000.png differ diff --git a/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00001.png b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00001.png new file mode 100644 index 000000000..e993bf998 Binary files /dev/null and b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00001.png differ diff --git a/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00002.png b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00002.png new file mode 100644 index 000000000..e1effabb5 Binary files /dev/null and b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00002.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00012.png b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00003.png similarity index 100% rename from tests/ragger/snapshots/stax/test_sign_parameter_selector/00012.png rename to tests/ragger/snapshots/stax/test_blind_sign_nonzero/00003.png diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00013.png b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00004.png similarity index 100% rename from tests/ragger/snapshots/stax/test_sign_parameter_selector/00013.png rename to tests/ragger/snapshots/stax/test_blind_sign_nonzero/00004.png diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00014.png b/tests/ragger/snapshots/stax/test_blind_sign_nonzero/00005.png similarity index 100% rename from tests/ragger/snapshots/stax/test_sign_parameter_selector/00014.png rename to tests/ragger/snapshots/stax/test_blind_sign_nonzero/00005.png diff --git a/tests/ragger/snapshots/stax/test_blind_sign_rejected/00002.png b/tests/ragger/snapshots/stax/test_blind_sign_rejected/00002.png index 648b561d1..1898206ed 100644 Binary files a/tests/ragger/snapshots/stax/test_blind_sign_rejected/00002.png and b/tests/ragger/snapshots/stax/test_blind_sign_rejected/00002.png differ diff --git a/tests/ragger/snapshots/stax/test_blind_sign_signed/00002.png b/tests/ragger/snapshots/stax/test_blind_sign_signed/00002.png deleted file mode 100644 index 648b561d1..000000000 Binary files a/tests/ragger/snapshots/stax/test_blind_sign_signed/00002.png and /dev/null differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00001.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00001.png index 71e083bd4..971b7e980 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00001.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00001.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00004.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00004.png index da2ee316d..a7f87896a 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00004.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00004.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00006.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00006.png index e8e7bd388..9696ae123 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00006.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00006.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00007.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00007.png index 05ddaeec2..e993bf998 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00007.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00007.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00008.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00008.png index e649f0eea..1898206ed 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00008.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00008.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00009.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00009.png index 9696ae123..fcccc77df 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00009.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00009.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00010.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00010.png index e993bf998..3c89d74c4 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00010.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00010.png differ diff --git a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00011.png b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00011.png index 648b561d1..392165d4f 100644 Binary files a/tests/ragger/snapshots/stax/test_sign_parameter_selector/00011.png and b/tests/ragger/snapshots/stax/test_sign_parameter_selector/00011.png differ diff --git a/tests/ragger/test_blind_sign.py b/tests/ragger/test_blind_sign.py index 99fb59d33..acc85fec2 100644 --- a/tests/ragger/test_blind_sign.py +++ b/tests/ragger/test_blind_sign.py @@ -1,6 +1,8 @@ from pathlib import Path import json from typing import Optional +import time + import pytest from web3 import Web3 @@ -23,22 +25,27 @@ # TODO: do one test with nonce display -@pytest.fixture(name="sign", params=[True, False]) -def sign_fixture(request) -> bool: +@pytest.fixture(name="reject", params=[False, True]) +def reject_fixture(request) -> bool: return request.param -def common_tx_params() -> dict: +@pytest.fixture(name="amount", params=[0.0, 1.2]) +def amount_fixture(request) -> float: + return request.param + + +def common_tx_params(amount: float) -> dict: with open(f"{ABIS_FOLDER}/erc20.json", encoding="utf-8") as file: contract = Web3().eth.contract( abi=json.load(file), address=None ) - data = contract.encode_abi("approve", [ - # Uniswap Protocol: Permit2 - bytes.fromhex("000000000022d473030f116ddee9f6b43ac78ba3"), - Web3.to_wei("2", "ether") + # this function is not handled by the internal plugin, so won't check if value == 0 + data = contract.encode_abi("balanceOf", [ + bytes.fromhex("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045"), ]) + return { "nonce": 235, "maxFeePerGas": Web3.to_wei(100, "gwei"), @@ -47,7 +54,8 @@ def common_tx_params() -> dict: # Maker: Dai Stablecoin "to": bytes.fromhex("6b175474e89094c44da98b954eedeac495271d0f"), "data": data, - "chainId": 1 + "chainId": 1, + "value": Web3.to_wei(amount, "ether"), } @@ -57,24 +65,28 @@ def test_blind_sign(firmware: Firmware, navigator: Navigator, default_screenshot_path: Path, test_name: str, - sign: bool): + reject: bool, + amount: float): global DEVICE_ADDR app_client = EthAppClient(backend) + if reject and amount > 0.0: + pytest.skip() settings_toggle(firmware, navigator, [SettingID.BLIND_SIGNING]) if DEVICE_ADDR is None: with app_client.get_public_addr(bip32_path=BIP32_PATH, display=False): pass _, DEVICE_ADDR, _ = ResponseParser.pk_addr(app_client.response().data) - tx_params = common_tx_params() + tx_params = common_tx_params(amount) try: with app_client.sign(BIP32_PATH, tx_params): - if sign: - test_name += "_signed" - else: + if reject: test_name += "_rejected" + if amount > 0.0: + test_name += "_nonzero" + moves = [] if firmware.is_nano: # blind signing warning @@ -95,6 +107,10 @@ def test_blind_sign(firmware: Firmware, else: moves += [NavInsID.RIGHT_CLICK] + # amount + if amount > 0.0: + moves += [NavInsID.RIGHT_CLICK] + # to if firmware == Firmware.NANOS: moves += [NavInsID.RIGHT_CLICK] * 3 @@ -104,7 +120,7 @@ def test_blind_sign(firmware: Firmware, # fees moves += [NavInsID.RIGHT_CLICK] - if not sign: + if reject: moves += [NavInsID.RIGHT_CLICK] moves += [NavInsID.BOTH_CLICK] @@ -113,7 +129,7 @@ def test_blind_sign(firmware: Firmware, moves += [NavInsID.SWIPE_CENTER_TO_LEFT] * 3 - if sign: + if not reject: moves += [NavInsID.USE_CASE_REVIEW_CONFIRM] else: moves += [NavInsID.USE_CASE_REVIEW_REJECT] @@ -123,10 +139,10 @@ def test_blind_sign(firmware: Firmware, test_name, moves) except ExceptionRAPDU as e: - assert not sign + assert reject assert e.status == StatusWord.CONDITION_NOT_SATISFIED else: - assert sign + assert not reject # verify signature vrs = ResponseParser.signature(app_client.response().data) addr = recover_transaction(tx_params, vrs) @@ -144,7 +160,7 @@ def test_blind_sign_reject_in_risk_review(firmware: Firmware, settings_toggle(firmware, navigator, [SettingID.BLIND_SIGNING]) try: - with app_client.sign(BIP32_PATH, common_tx_params()): + with app_client.sign(BIP32_PATH, common_tx_params(0.0)): moves = [NavInsID.USE_CASE_CHOICE_CONFIRM] navigator.navigate(moves) except ExceptionRAPDU as e: @@ -170,7 +186,7 @@ def test_sign_parameter_selector(firmware: Firmware, settings_toggle(firmware, navigator, [SettingID.BLIND_SIGNING, SettingID.DEBUG_DATA]) - tx_params = common_tx_params() + tx_params = common_tx_params(0.0) data_len = len(bytes.fromhex(tx_params["data"][2:])) params = (data_len - 4) // 32 with app_client.sign(BIP32_PATH, tx_params): @@ -179,11 +195,7 @@ def test_sign_parameter_selector(firmware: Firmware, # verify | selector moves += [NavInsID.RIGHT_CLICK] * 2 + [NavInsID.BOTH_CLICK] if firmware == Firmware.NANOS: - # hardcoded for each because for some params take more pages than others - # parameter 1 - moves += [NavInsID.RIGHT_CLICK] * 4 + [NavInsID.BOTH_CLICK] - # parameter 2 - moves += [NavInsID.RIGHT_CLICK] * 3 + [NavInsID.BOTH_CLICK] + moves += ([NavInsID.RIGHT_CLICK] * 4 + [NavInsID.BOTH_CLICK]) * params # blind signing | review | tx hash | from | to | fees moves += [NavInsID.RIGHT_CLICK] * 13 else: @@ -216,10 +228,11 @@ def test_blind_sign_not_enabled_error(firmware: Firmware, app_client = EthAppClient(backend) try: - with app_client.sign(BIP32_PATH, common_tx_params()): + with app_client.sign(BIP32_PATH, common_tx_params(0.0)): moves = [] if firmware.is_nano: if firmware == Firmware.NANOS: + time.sleep(0.5) # seems to take some time moves += [NavInsID.RIGHT_CLICK] moves += [NavInsID.BOTH_CLICK] else: