From 41eaa74eb57933d5053e3dd17db5989fd735c742 Mon Sep 17 00:00:00 2001 From: neithanmo Date: Fri, 15 Sep 2023 12:17:03 +0200 Subject: [PATCH 1/4] feat(deps) Update btc submodule --- deps/btc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/btc b/deps/btc index 4902a8c70..6748b6215 160000 --- a/deps/btc +++ b/deps/btc @@ -1 +1 @@ -Subproject commit 4902a8c70b4b4ea527c5917d9f9e2861d380d4e1 +Subproject commit 6748b621514f1188e778211f41a0a5c225d3f4e3 From ecf0e22cd17bb949e7e2fc64abc3ebd436f0ea6c Mon Sep 17 00:00:00 2001 From: neithanmo Date: Fri, 15 Sep 2023 12:15:31 +0200 Subject: [PATCH 2/4] fix(paths) Remove no longer needed compilation flags to set-up coin types --- app/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Makefile b/app/Makefile index f1f698e1d..89efd3f2a 100755 --- a/app/Makefile +++ b/app/Makefile @@ -264,8 +264,6 @@ ifeq (,$(filter $(TARGET_NAME),TARGET_NANOS TARGET_STAX)) # mainnet or testnet. lets pick # the ones for mainnet for now DEFINES += BIP32_PUBKEY_VERSION=0x0488B21E - DEFINES += BIP44_COIN_TYPE=0 - DEFINES += BIP44_COIN_TYPE_2=0 # The coin type bellow is not part of the btc app, # but this is necesary here as avax wants support for # coin_type = 60' From 7b94a0b28b58991a25241df5a2e17950522ba392 Mon Sep 17 00:00:00 2001 From: neithanmo Date: Fri, 15 Sep 2023 12:16:35 +0200 Subject: [PATCH 3/4] fix(cmds) Remove suppor for registerin a wallet, avax user are allow to use avax's default wallet policy --- app/c/handler.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/c/handler.c b/app/c/handler.c index 193a41f5d..6e5fa13c7 100644 --- a/app/c/handler.c +++ b/app/c/handler.c @@ -55,11 +55,6 @@ const command_descriptor_t COMMAND_DESCRIPTORS[] = { .ins = GET_WALLET_ADDRESS, .handler = (command_handler_t)handler_get_wallet_address }, - { - .cla = CLA_APP, - .ins = REGISTER_WALLET, - .handler = (command_handler_t)handler_register_wallet - }, { .cla = CLA_APP, .ins = SIGN_PSBT, From 710ee24aa22141276076061fe3c5411b52cbf3ac Mon Sep 17 00:00:00 2001 From: becominginsane Date: Fri, 22 Sep 2023 02:25:20 +0800 Subject: [PATCH 4/4] deps(sdk): fix sdk version feat(just): add `ci` recipe --- .github/workflows/main.yaml | 2 +- Justfile | 43 +++++++++++++++++++++++++++++++++++++ deps/dockerized_build.mk | 2 +- zemu/package.json | 2 +- 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1ef020616..ffcabbb92 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -79,7 +79,7 @@ jobs: - varname: STAX_SDK target: stax container: - image: zondax/ledger-app-builder:latest + image: zondax/ledger-app-builder:ledger-d5bfe2e793f15a826971ae9de2adcad524df3e8e env: SDK_VARNAME: ${{ matrix.sdk.varname }} options: --user ${{ needs.configure.outputs.uid_gid }} diff --git a/Justfile b/Justfile index eb64b34bb..786e73ea1 100644 --- a/Justfile +++ b/Justfile @@ -52,3 +52,46 @@ cargo *cmd='': cargo {{cmd}} insta: (cargo "insta test --review") + +_ztest-ci: + #!/bin/env bash + pushd zemu + TESTS=`yarn test --listTests --json | head -n 3 | tail -n 1 | jq -r '.[]'` + + has_failed=0 + outputs=() + + for file in ${TESTS[@]}; do + output=`yarn jest "$file" --maxConcurrency 2 2>&1` + exit=$? + + outputs+=("$output") + if [ $exit -ne 0 ]; then + echo "=== Test $file failed ===" + has_failed=1 + fi + done + + if [ $has_failed -eq 1 ]; then + for i in "${!outputs[@]}"; do + output=$outputs[i] + file=$TESTS[i] + echo "=== Test Output for $file ===" + echo "$output" + done + echo "Some tests failed. See detailed output above." + exit 1 + else + echo "All tests passed." + exit 0 + fi + + popd + +# Run the same things as a normal CI workflow +ci: + just miri + cargo fmt -- --check + cargo clippy --all-targets --features "full" + just make clean all + just _ztest-ci diff --git a/deps/dockerized_build.mk b/deps/dockerized_build.mk index 2c22f1b8d..5ffda177d 100644 --- a/deps/dockerized_build.mk +++ b/deps/dockerized_build.mk @@ -47,7 +47,7 @@ $(info TESTS_ZEMU_DIR : $(TESTS_ZEMU_DIR)) $(info TESTS_JS_DIR : $(TESTS_JS_DIR)) $(info TESTS_JS_PACKAGE : $(TESTS_JS_PACKAGE)) -DOCKER_IMAGE_ZONDAX=zondax/ledger-app-builder:latest +DOCKER_IMAGE_ZONDAX=zondax/ledger-app-builder:ledger-d5bfe2e793f15a826971ae9de2adcad524df3e8e DOCKER_IMAGE_LEDGER=ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest ifdef INTERACTIVE diff --git a/zemu/package.json b/zemu/package.json index 227cacb94..549331505 100644 --- a/zemu/package.json +++ b/zemu/package.json @@ -18,7 +18,7 @@ "dependencies": { "@types/node": "^18.14.6", "@zondax/ledger-avalanche-app": "link:../js", - "@zondax/zemu": "^0.44.0" + "@zondax/zemu": "=0.44.0" }, "devDependencies": { "@ethereumjs/common": "^3.1.1",