Skip to content

Commit

Permalink
Merge pull request #11 from Zondax/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
chcmedeiros authored Apr 17, 2024
2 parents c82cfae + 7a6a214 commit 2f83494
Show file tree
Hide file tree
Showing 98 changed files with 46 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=0
# This is the minor version
APPVERSION_N=0
# This is the patch version
APPVERSION_P=12
APPVERSION_P=13
20 changes: 16 additions & 4 deletions app/src/parser_impl_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,14 @@ static parser_error_t printERC20(const parser_context_t *ctx, uint8_t displayIdx

case 7:
snprintf(outKey, outKeyLen, "Data");
array_to_hexstr(data_array, sizeof(data_array), eth_tx_obj.legacy.data.ptr, DATA_BYTES_TO_PRINT);
snprintf(data_array + (2 * DATA_BYTES_TO_PRINT), 4, "...");
array_to_hexstr(
data_array, sizeof(data_array), eth_tx_obj.legacy.data.ptr,
eth_tx_obj.legacy.data.rlpLen > DATA_BYTES_TO_PRINT ? DATA_BYTES_TO_PRINT : eth_tx_obj.legacy.data.rlpLen);

if (eth_tx_obj.legacy.data.rlpLen > DATA_BYTES_TO_PRINT) {
snprintf(data_array + (2 * DATA_BYTES_TO_PRINT), 4, "...");
}

pageString(outVal, outValLen, data_array, pageIdx, pageCount);
break;

Expand Down Expand Up @@ -295,8 +301,14 @@ static parser_error_t printGeneric(const parser_context_t *ctx, uint8_t displayI

case 2:
snprintf(outKey, outKeyLen, "Data");
array_to_hexstr(data_array, sizeof(data_array), eth_tx_obj.legacy.data.ptr, DATA_BYTES_TO_PRINT);
snprintf(data_array + (2 * DATA_BYTES_TO_PRINT), 4, "...");
array_to_hexstr(
data_array, sizeof(data_array), eth_tx_obj.legacy.data.ptr,
eth_tx_obj.legacy.data.rlpLen > DATA_BYTES_TO_PRINT ? DATA_BYTES_TO_PRINT : eth_tx_obj.legacy.data.rlpLen);

if (eth_tx_obj.legacy.data.rlpLen > DATA_BYTES_TO_PRINT) {
snprintf(data_array + (2 * DATA_BYTES_TO_PRINT), 4, "...");
}

pageString(outVal, outValLen, data_array, pageIdx, pageCount);
break;

Expand Down
2 changes: 1 addition & 1 deletion deps/ledger-zxlib
2 changes: 1 addition & 1 deletion deps/nanosplus-secure-sdk
Submodule nanosplus-secure-sdk updated 75 files
+89 −303 .github/workflows/build_all_apps.yml
+2 −2 .github/workflows/check_clang_static_analyzer.yml
+1 −1 Makefile.app_params
+8 −5 Makefile.defines
+4 −4 Makefile.glyphs
+1 −1 Makefile.rules
+9 −6 Makefile.standard_app
+5 −3 README.md
+8 −0 include/app_config.h
+7 −0 include/cx_stubs.h
+1 −1 include/cx_trampoline.h
+3 −0 include/os_io.h
+2 −0 include/os_io_seproxyhal.h
+1 −0 include/os_print.h
+4 −4 lib_blewbxx_impl/src/ledger_ble.c
+7 −0 lib_cxng/cx.export
+29 −0 lib_cxng/include/lcx_crc.h
+129 −0 lib_cxng/include/lcx_eddsa.h
+2 −0 lib_cxng/src/cx_aes.c
+1 −8 lib_cxng/src/cx_crc.h
+2 −0 lib_cxng/src/cx_crc16.c
+1 −1 lib_cxng/src/cx_crc32.c
+317 −227 lib_cxng/src/cx_eddsa.c
+7 −0 lib_cxng/src/cx_exported_functions.c
+2 −0 lib_cxng/src/cx_hash.c
+2 −0 lib_cxng/src/cx_sha256.c
+12 −5 lib_nbgl/doc/nbgl_use_case.dox
+3 −2 lib_nbgl/include/nbgl_content.h
+1 −0 lib_nbgl/include/nbgl_debug.h
+4 −4 lib_nbgl/include/nbgl_draw.h
+1 −1 lib_nbgl/include/nbgl_fonts.h
+117 −42 lib_nbgl/include/nbgl_layout.h
+20 −120 lib_nbgl/include/nbgl_obj.h
+1 −1 lib_nbgl/include/nbgl_page.h
+128 −0 lib_nbgl/include/nbgl_types.h
+127 −11 lib_nbgl/include/nbgl_use_case.h
+1 −10 lib_nbgl/serialization/nbgl_lib.py
+22 −12 lib_nbgl/src/nbgl_draw.c
+4 −8 lib_nbgl/src/nbgl_fonts.c
+93 −28 lib_nbgl/src/nbgl_layout.c
+4 −0 lib_nbgl/src/nbgl_layout_internal.h
+608 −240 lib_nbgl/src/nbgl_layout_keyboard.c
+286 −36 lib_nbgl/src/nbgl_layout_keypad.c
+4 −3 lib_nbgl/src/nbgl_layout_navigation.c
+40 −38 lib_nbgl/src/nbgl_obj.c
+47 −60 lib_nbgl/src/nbgl_obj_keyboard.c
+8 −8 lib_nbgl/src/nbgl_obj_keypad.c
+10 −2 lib_nbgl/src/nbgl_page.c
+13 −4 lib_nbgl/src/nbgl_screen.c
+86 −15 lib_nbgl/src/nbgl_touch.c
+1,052 −441 lib_nbgl/src/nbgl_use_case.c
+4 −4 lib_nbgl/tools/generate_ledgerimg.sh
+8 −3 lib_nbgl/tools/icon2glyph.py
+17 −0 lib_standard_app/io.c
+7 −7 lib_standard_app/io.h
+1 −1 lib_stusb_impl/u2f_impl.c
+6 −8 lib_stusb_impl/usbd_impl.c
+3 −0 lib_ux_nbgl/ux.c
+64 −0 lib_ux_sync/include/ux_sync.h
+295 −0 lib_ux_sync/src/ux_sync.c
+8 −0 src/app_metadata.c
+7 −0 src/cx_stubs.S
+1 −1 src/ledger_assert.c
+1 −0 src/os.c
+2 −1 src/os_io_seproxyhal.c
+1 −0 src/os_io_task.c
+1 −0 src/os_printf.c
+3 −3 target/flex/include/bolos_target.h
+0 −0 target/flex/plugin_script.ld
+1 −0 target/flex/script.ld
+1 −0 target/nanos/script.ld
+1 −0 target/nanos2/script.ld
+1 −0 target/nanox/script.ld
+1 −0 target/stax/script.ld
+2 −2 tools/ttf2inc.py
2 changes: 1 addition & 1 deletion deps/nanox-secure-sdk
Submodule nanox-secure-sdk updated 75 files
+89 −303 .github/workflows/build_all_apps.yml
+2 −2 .github/workflows/check_clang_static_analyzer.yml
+1 −1 Makefile.app_params
+8 −5 Makefile.defines
+4 −4 Makefile.glyphs
+1 −1 Makefile.rules
+9 −6 Makefile.standard_app
+5 −3 README.md
+8 −0 include/app_config.h
+7 −0 include/cx_stubs.h
+1 −1 include/cx_trampoline.h
+3 −0 include/os_io.h
+2 −0 include/os_io_seproxyhal.h
+1 −0 include/os_print.h
+4 −4 lib_blewbxx_impl/src/ledger_ble.c
+7 −0 lib_cxng/cx.export
+29 −0 lib_cxng/include/lcx_crc.h
+129 −0 lib_cxng/include/lcx_eddsa.h
+2 −0 lib_cxng/src/cx_aes.c
+1 −8 lib_cxng/src/cx_crc.h
+2 −0 lib_cxng/src/cx_crc16.c
+1 −1 lib_cxng/src/cx_crc32.c
+317 −227 lib_cxng/src/cx_eddsa.c
+7 −0 lib_cxng/src/cx_exported_functions.c
+2 −0 lib_cxng/src/cx_hash.c
+2 −0 lib_cxng/src/cx_sha256.c
+12 −5 lib_nbgl/doc/nbgl_use_case.dox
+3 −2 lib_nbgl/include/nbgl_content.h
+1 −0 lib_nbgl/include/nbgl_debug.h
+4 −4 lib_nbgl/include/nbgl_draw.h
+1 −1 lib_nbgl/include/nbgl_fonts.h
+117 −42 lib_nbgl/include/nbgl_layout.h
+20 −120 lib_nbgl/include/nbgl_obj.h
+1 −1 lib_nbgl/include/nbgl_page.h
+128 −0 lib_nbgl/include/nbgl_types.h
+127 −11 lib_nbgl/include/nbgl_use_case.h
+1 −10 lib_nbgl/serialization/nbgl_lib.py
+22 −12 lib_nbgl/src/nbgl_draw.c
+4 −8 lib_nbgl/src/nbgl_fonts.c
+93 −28 lib_nbgl/src/nbgl_layout.c
+4 −0 lib_nbgl/src/nbgl_layout_internal.h
+608 −240 lib_nbgl/src/nbgl_layout_keyboard.c
+286 −36 lib_nbgl/src/nbgl_layout_keypad.c
+4 −3 lib_nbgl/src/nbgl_layout_navigation.c
+40 −38 lib_nbgl/src/nbgl_obj.c
+47 −60 lib_nbgl/src/nbgl_obj_keyboard.c
+8 −8 lib_nbgl/src/nbgl_obj_keypad.c
+10 −2 lib_nbgl/src/nbgl_page.c
+13 −4 lib_nbgl/src/nbgl_screen.c
+86 −15 lib_nbgl/src/nbgl_touch.c
+1,052 −441 lib_nbgl/src/nbgl_use_case.c
+4 −4 lib_nbgl/tools/generate_ledgerimg.sh
+8 −3 lib_nbgl/tools/icon2glyph.py
+17 −0 lib_standard_app/io.c
+7 −7 lib_standard_app/io.h
+1 −1 lib_stusb_impl/u2f_impl.c
+6 −8 lib_stusb_impl/usbd_impl.c
+3 −0 lib_ux_nbgl/ux.c
+64 −0 lib_ux_sync/include/ux_sync.h
+295 −0 lib_ux_sync/src/ux_sync.c
+8 −0 src/app_metadata.c
+7 −0 src/cx_stubs.S
+1 −1 src/ledger_assert.c
+1 −0 src/os.c
+2 −1 src/os_io_seproxyhal.c
+1 −0 src/os_io_task.c
+1 −0 src/os_printf.c
+3 −3 target/flex/include/bolos_target.h
+0 −0 target/flex/plugin_script.ld
+1 −0 target/flex/script.ld
+1 −0 target/nanos/script.ld
+1 −0 target/nanos2/script.ld
+1 −0 target/nanox/script.ld
+1 −0 target/stax/script.ld
+2 −2 tools/ttf2inc.py
2 changes: 1 addition & 1 deletion deps/stax-secure-sdk
Submodule stax-secure-sdk updated 2685 files
8 changes: 4 additions & 4 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"url": "https://github.com/zondax/ledger-flare/issues"
},
"dependencies": {
"@zondax/ledger-js": "^0.2.1",
"@ledgerhq/hw-app-eth": "6.29.7"
"@ledgerhq/hw-app-eth": "6.35.7",
"@zondax/ledger-js": "^0.2.1"
},
"devDependencies": {
"@types/node": "^18.11.18",
Expand All @@ -38,8 +38,8 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^2.8.1",
"typescript": "^5.3.3"
"prettier": "^3.2.5",
"typescript": "^5.4.5"
},
"files": [
"dist/**/*"
Expand Down
4 changes: 2 additions & 2 deletions tests_zemu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@zondax/ledger-flare": "../js",
"@zondax/zemu": "^0.47.0"
"@zondax/zemu": "^0.48.0"
},
"devDependencies": {
"@ethereumjs/common": "^2.4.0",
Expand All @@ -45,6 +45,6 @@
"secp256k1": "^5.0.0",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/s-mainmenu/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/s-mainmenu/00010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/sp-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/sp-mainmenu/00010.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00001.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00002.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00003.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/x-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/x-mainmenu/00010.png
18 changes: 18 additions & 0 deletions tests_zemu/tests/eth_legacy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ const SIGN_TEST_DATA = [
},
chainId: 14,
},
{
name: 'undelegate_contract',
op: {
to: 'c67dce33d7a8efa5ffeb961899c73fe01bce9273',
value: '03e8',
data: 'b302f393',
},
chainId: 14,
},
{
name: 'deposit_dummy_contract',
op: {
to: 'c67dce33d7a8efa5ffeb961899c73fe01bce9273',
value: '03e8',
data: 'b302f3930001',
},
chainId: 14,
},
]

const rawUnsignedLegacyTransaction = (params: any, chainId: number | undefined) => {
Expand Down

0 comments on commit 2f83494

Please sign in to comment.