diff --git a/app/Makefile.version b/app/Makefile.version index bda91a7..0fbc502 100644 --- a/app/Makefile.version +++ b/app/Makefile.version @@ -3,4 +3,4 @@ APPVERSION_M=1 # This is the `spec_version` field of `Runtime` APPVERSION_N=0 # This is the patch version of this release -APPVERSION_P=4 +APPVERSION_P=5 diff --git a/app/src/parser_print_common.c b/app/src/parser_print_common.c index 9de872f..ef54e42 100644 --- a/app/src/parser_print_common.c +++ b/app/src/parser_print_common.c @@ -30,7 +30,12 @@ #define PREFIX "yay with councils:\n" #define PREFIX_COUNCIL "Council: " #define PREFIX_SPENDING "spending cap: " - +#if defined(LEDGER_SPECIFIC) +#define NAM_MAINNET_ADDRESS "tnam1q9gr66cvu4hrzm0sd5kmlnjje82gs3xlfg3v6nu7" +#else +// Test address to verify the address replacement by NAM +#define NAM_MAINNET_ADDRESS "tnam1qx60d9v036kfqhfnt2lua5uquh3d3hhrzva03gfl" +#endif #define CHECK_PTR_BOUNDS(count, dstLen) \ if((count + 1) >= dstLen) { \ @@ -88,7 +93,13 @@ parser_error_t printAddressAlt(const AddressAlt *addr, char address[110] = {0}; CHECK_ERROR(crypto_encodeAltAddress(addr, address, sizeof(address))) - pageString(outVal, outValLen, (const char*) address, pageIdx, pageCount); + + // Comapare with NAM mainnet address + if (memcmp(address, NAM_MAINNET_ADDRESS, strlen(NAM_MAINNET_ADDRESS)) == 0) { + pageString(outVal, outValLen, "NAM", pageIdx, pageCount); + } else { + pageString(outVal, outValLen, (const char*) address, pageIdx, pageCount); + } return parser_ok; } diff --git a/deps/ledger-zxlib b/deps/ledger-zxlib index 3d4ec19..eebf9d5 160000 --- a/deps/ledger-zxlib +++ b/deps/ledger-zxlib @@ -1 +1 @@ -Subproject commit 3d4ec19264fd20e9608b0c0432b08474d247917c +Subproject commit eebf9d533a497f01e60f7a6f8bd5465b1379882c diff --git a/tests/testvectors.json b/tests/testvectors.json index fe21cd2..360005f 100644 --- a/tests/testvectors.json +++ b/tests/testvectors.json @@ -22,8 +22,7 @@ "13 | Timeout timestamp : 2532-11-08T20:58:07.450111911Z", "14 | Sender [1/2] : tnam1qx8zhzupfafg98trt6xgknjg0693vxlp9", "14 | Sender [2/2] : spsy7lh", - "15 | Sending Token [1/2] : tnam1qx60d9v036kfqhfnt2lua5uquh3d3hhrz", - "15 | Sending Token [2/2] : va03gfl", + "15 | Sending Token : NAM", "16 | Sending Amount [1/3] : 0.000000000000000000000000000000000000", "16 | Sending Amount [2/3] : 00000000000000000544451787073501541541", "16 | Sending Amount [3/3] : 3993718908291383296", @@ -35,16 +34,14 @@ "17 | Sender [6/8] : dcc4tuy9l2zhyy4e2pfxfh6wsh9l8vutrzqg8s", "17 | Sender [7/8] : mktvf9sjhrlwj0zqlfa7sq3l2tm9fyxgdvcwzf", "17 | Sender [8/8] : z3tyltpnwu7qnddu9a", - "18 | Sending Token [1/2] : tnam1qx60d9v036kfqhfnt2lua5uquh3d3hhrz", - "18 | Sending Token [2/2] : va03gfl", + "18 | Sending Token : NAM", "19 | Sending Amount [1/3] : 0.000000000000000000000000000000000000", "19 | Sending Amount [2/3] : 00000000000000002007665964833536934433", "19 | Sending Amount [3/3] : 9101838474324475904", "20 | Destination [1/3] : znam1q4drwwk8u5v9h27zqyk5ger7tazy86y4s", "20 | Destination [2/3] : sxyxddmntx80p4nrhvtw0xm5egx3prv9y4pj2h", "20 | Destination [3/3] : lzus", - "21 | Receiving Token [1/2] : tnam1qx60d9v036kfqhfnt2lua5uquh3d3hhrz", - "21 | Receiving Token [2/2] : va03gfl", + "21 | Receiving Token : NAM", "22 | Receiving Amount [1/3] : 0.000000000000000000000000000000000000", "22 | Receiving Amount [2/3] : 00000000000000002552117751907038475975", "22 | Receiving Amount [3/3] : 30955573826158592" @@ -70,8 +67,7 @@ "14 | Timeout timestamp : 2532-11-08T20:58:07.450111911Z", "15 | Sender [1/2] : tnam1qx8zhzupfafg98trt6xgknjg0693vxlp9", "15 | Sender [2/2] : spsy7lh", - "16 | Sending Token [1/2] : tnam1qx60d9v036kfqhfnt2lua5uquh3d3hhrz", - "16 | Sending Token [2/2] : va03gfl", + "16 | Sending Token : NAM", "17 | Sending Amount [1/3] : 0.000000000000000000000000000000000000", "17 | Sending Amount [2/3] : 00000000000000000544451787073501541541", "17 | Sending Amount [3/3] : 3993718908291383296", @@ -83,16 +79,14 @@ "18 | Sender [6/8] : dcc4tuy9l2zhyy4e2pfxfh6wsh9l8vutrzqg8s", "18 | Sender [7/8] : mktvf9sjhrlwj0zqlfa7sq3l2tm9fyxgdvcwzf", "18 | Sender [8/8] : z3tyltpnwu7qnddu9a", - "19 | Sending Token [1/2] : tnam1qx60d9v036kfqhfnt2lua5uquh3d3hhrz", - "19 | Sending Token [2/2] : va03gfl", + "19 | Sending Token : NAM", "20 | Sending Amount [1/3] : 0.000000000000000000000000000000000000", "20 | Sending Amount [2/3] : 00000000000000002007665964833536934433", "20 | Sending Amount [3/3] : 9101838474324475904", "21 | Destination [1/3] : znam1q4drwwk8u5v9h27zqyk5ger7tazy86y4s", "21 | Destination [2/3] : sxyxddmntx80p4nrhvtw0xm5egx3prv9y4pj2h", "21 | Destination [3/3] : lzus", - "22 | Receiving Token [1/2] : tnam1qx60d9v036kfqhfnt2lua5uquh3d3hhrz", - "22 | Receiving Token [2/2] : va03gfl", + "22 | Receiving Token : NAM", "23 | Receiving Amount [1/3] : 0.000000000000000000000000000000000000", "23 | Receiving Amount [2/3] : 00000000000000002552117751907038475975", "23 | Receiving Amount [3/3] : 30955573826158592", @@ -50947,4 +50941,4 @@ ], "valid": true } -] \ No newline at end of file +] diff --git a/tests_zemu/snapshots/fl-mainmenu/00004.png b/tests_zemu/snapshots/fl-mainmenu/00004.png index 9e6cd16..b1f1c18 100644 Binary files a/tests_zemu/snapshots/fl-mainmenu/00004.png and b/tests_zemu/snapshots/fl-mainmenu/00004.png differ diff --git a/tests_zemu/snapshots/s-mainmenu/00004.png b/tests_zemu/snapshots/s-mainmenu/00004.png index 76b04e7..bc78cb2 100644 Binary files a/tests_zemu/snapshots/s-mainmenu/00004.png and b/tests_zemu/snapshots/s-mainmenu/00004.png differ diff --git a/tests_zemu/snapshots/s-mainmenu/00010.png b/tests_zemu/snapshots/s-mainmenu/00010.png index 76b04e7..bc78cb2 100644 Binary files a/tests_zemu/snapshots/s-mainmenu/00010.png and b/tests_zemu/snapshots/s-mainmenu/00010.png differ diff --git a/tests_zemu/snapshots/sp-mainmenu/00004.png b/tests_zemu/snapshots/sp-mainmenu/00004.png index 3e80601..0c89568 100644 Binary files a/tests_zemu/snapshots/sp-mainmenu/00004.png and b/tests_zemu/snapshots/sp-mainmenu/00004.png differ diff --git a/tests_zemu/snapshots/sp-mainmenu/00010.png b/tests_zemu/snapshots/sp-mainmenu/00010.png index 3e80601..0c89568 100644 Binary files a/tests_zemu/snapshots/sp-mainmenu/00010.png and b/tests_zemu/snapshots/sp-mainmenu/00010.png differ diff --git a/tests_zemu/snapshots/st-mainmenu/00004.png b/tests_zemu/snapshots/st-mainmenu/00004.png index e169e84..dda362e 100644 Binary files a/tests_zemu/snapshots/st-mainmenu/00004.png and b/tests_zemu/snapshots/st-mainmenu/00004.png differ diff --git a/tests_zemu/snapshots/x-mainmenu/00004.png b/tests_zemu/snapshots/x-mainmenu/00004.png index 3e80601..0c89568 100644 Binary files a/tests_zemu/snapshots/x-mainmenu/00004.png and b/tests_zemu/snapshots/x-mainmenu/00004.png differ diff --git a/tests_zemu/snapshots/x-mainmenu/00010.png b/tests_zemu/snapshots/x-mainmenu/00010.png index 3e80601..0c89568 100644 Binary files a/tests_zemu/snapshots/x-mainmenu/00010.png and b/tests_zemu/snapshots/x-mainmenu/00010.png differ