Skip to content

Commit

Permalink
Merge pull request #45 from cosmos/main (B2CA-1744)
Browse files Browse the repository at this point in the history
Flex support
  • Loading branch information
tdejoigny-ledger authored Jul 29, 2024
2 parents 50e9da1 + 30910a6 commit c88771a
Show file tree
Hide file tree
Showing 225 changed files with 247 additions and 158 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
version: ${{ steps.store-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- run: make version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
82 changes: 77 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Install deps
Expand All @@ -41,7 +41,7 @@ jobs:
size: ${{steps.build.outputs.size}}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Build Standard app
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
echo $HOME
echo $DISPLAY
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
BOLOS_SDK: /opt/nanos-secure-sdk
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Install deps
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
BOLOS_SDK: /opt/nanosplus-secure-sdk
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Install deps
Expand All @@ -163,3 +163,75 @@ jobs:
tag_name: ${{ steps.nanosp.outputs.tag_name }}
draft: false
prerelease: false

build_package_stax:
needs: [configure, build, build_ledger, test_zemu]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
image: zondax/ledger-app-builder:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: /opt/stax-secure-sdk
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install deps
run: pip install ledgerblue

- name: Build Stax
shell: bash -l {0}
run: |
PRODUCTION_BUILD=0 make
- name: Set tag
id: stax
run: echo "tag_name=$(./app/pkg/installer_stax.sh version)" >> $GITHUB_OUTPUT
- name: Update Release
id: update_release_2
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
files: |
./app/pkg/installer_stax.sh
tag_name: ${{ steps.stax.outputs.tag_name }}
draft: false
prerelease: false

build_package_flex:
needs: [configure, build, build_ledger, test_zemu]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
image: zondax/ledger-app-builder:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: /opt/flex-secure-sdk
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install deps
run: pip install ledgerblue

- name: Build Flex
shell: bash -l {0}
run: |
PRODUCTION_BUILD=0 make
- name: Set tag
id: flex
run: echo "tag_name=$(./app/pkg/installer_flex.sh version)" >> $GITHUB_OUTPUT
- name: Update Release
id: update_release_2
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
files: |
./app/pkg/installer_flex.sh
tag_name: ${{ steps.flex.outputs.tag_name }}
draft: false
prerelease: false
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "deps/stax-secure-sdk"]
path = deps/stax-secure-sdk
url = https://github.com/LedgerHQ/ledger-secure-sdk
[submodule "deps/ledger-secure-sdk"]
path = deps/ledger-secure-sdk
url = https://github.com/LedgerHQ/ledger-secure-sdk
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# BOLOS_SDK NOT DEFINED We use a containerized build approach

ifeq ($(BOLOS_SDK),)
ZXLIB_COMPILE_STAX ?= 1
PRODUCTION_BUILD ?= 1
include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk
else
default:
Expand Down
16 changes: 14 additions & 2 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,20 @@ include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.installer_script
include $(BOLOS_SDK)/Makefile.defines
include $(CURDIR)/Makefile.version

PRODUCTION_BUILD ?= 1

# Display the target name
$(info ************ TARGET_NAME = [$(TARGET_NAME)])

# Display whether this is a production build or for internal use
ifeq ($(PRODUCTION_BUILD), 1)
$(info ************ PRODUCTION_BUILD = [PRODUCTION BUILD])
else
$(info ************ PRODUCTION_BUILD = [INTERNAL USE])
endif
# Add the PRODUCTION_BUILD definition to the compiler flags
DEFINES += PRODUCTION_BUILD=$(PRODUCTION_BUILD)

include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.app_testing

ifndef COIN
Expand Down Expand Up @@ -61,7 +73,7 @@ ifndef ICONNAME
$(error ICONNAME is not set)
endif

# Compile textual mode for all devices excetpt Nano S,
# Compile textual mode for all devices excetpt Nano S,
# and define a Min stack size for Nano S with some margin
# to get an error if app grows too much
ifneq ($(TARGET_NAME),TARGET_NANOS)
Expand All @@ -71,7 +83,7 @@ endif
ifeq ($(TARGET_NAME),TARGET_NANOS)
APP_STACK_MIN_SIZE := 1600
else
APP_STACK_MIN_SIZE := 1752
APP_STACK_MIN_SIZE := 1850
endif

include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.platform
Expand Down
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=2
# This is the `spec_version` field of `Runtime`
APPVERSION_N=35
# This is the patch version of this release
APPVERSION_P=23
APPVERSION_P=24
Binary file added app/flex_icon.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions app/src/common/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
#include <string.h>
#include "zxmacros.h"

#if defined(TARGET_NANOS2) || defined(TARGET_STAX)
#if defined(TARGET_NANOS2) || defined(TARGET_STAX) || defined(TARGET_FLEX)
#define RAM_BUFFER_SIZE 8192
#define FLASH_BUFFER_SIZE 16384
#elif defined(TARGET_NANOX)
#define RAM_BUFFER_SIZE 8158
#define RAM_BUFFER_SIZE 7168
#define FLASH_BUFFER_SIZE 16384
#elif defined(TARGET_NANOS)
#define RAM_BUFFER_SIZE 0
Expand All @@ -41,7 +41,7 @@ typedef struct
uint8_t buffer[FLASH_BUFFER_SIZE];
} storage_t;

#if defined(TARGET_NANOS) || defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX)
#if defined(TARGET_NANOS) || defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) || defined(TARGET_FLEX)
storage_t NV_CONST N_appdata_impl __attribute__((aligned(64)));
#define N_appdata (*(NV_VOLATILE storage_t *)PIC(&N_appdata_impl))
#endif
Expand Down Expand Up @@ -85,7 +85,7 @@ const char *tx_parse(tx_type_e type)
if (type != tx_json && type != tx_textual) {
return parser_getErrorDescription(parser_value_out_of_range);
}
#else
#else
if (type != tx_json) {
return parser_getErrorDescription(parser_value_out_of_range);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/json/json_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern "C" {
#define MAX_NUMBER_OF_TOKENS 96
#endif

#if defined(TARGET_STAX)
#if defined(TARGET_STAX) || defined(TARGET_FLEX)
#undef MAX_NUMBER_OF_TOKENS
#define MAX_NUMBER_OF_TOKENS 600
#endif
Expand Down
1 change: 1 addition & 0 deletions deps/ledger-secure-sdk
Submodule ledger-secure-sdk added at b46b4b
1 change: 0 additions & 1 deletion deps/nanos-secure-sdk
Submodule nanos-secure-sdk deleted from 7583ae
1 change: 0 additions & 1 deletion deps/nanosplus-secure-sdk
Submodule nanosplus-secure-sdk deleted from 7583ae
1 change: 0 additions & 1 deletion deps/nanox-secure-sdk
Submodule nanox-secure-sdk deleted from 7583ae
2 changes: 1 addition & 1 deletion ledger_app.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[app]
build_directory = "./app/"
sdk = "C"
devices = ["nanos", "nanox", "nanos+", "stax"]
devices = ["nanos", "nanox", "nanos+", "stax", "flex"]

[tests]
unit_directory = "./tests/"
18 changes: 9 additions & 9 deletions tests_zemu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@
},
"dependencies": {
"@zondax/ledger-cosmos-js": "^3.0.3",
"@zondax/zemu": "^0.49.0"
"@zondax/zemu": "^0.50.2"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/ledgerhq__hw-transport": "^4.21.8",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"bech32": "^2.0.0",
"blakejs": "^1.1.1",
"crypto-js": "4.2.0",
"eslint": "^8.57.0",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "29.7.0",
"jest-serial-runner": "^1.1.0",
"js-sha3": "0.9.3",
"jssha": "^3.2.0",
"keccak256": "^1.0.6",
"prettier": "^3.2.5",
"prettier": "^3.3.3",
"secp256k1": "^5.0.0",
"ts-jest": "^29.1.1",
"ts-jest": "^29.2.3",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"typescript": "^5.5.4"
}
}
Binary file added tests_zemu/snapshots/fl-govDeposit/00000.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 added tests_zemu/snapshots/fl-govDeposit/00001.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 added tests_zemu/snapshots/fl-govDeposit/00002.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 added tests_zemu/snapshots/fl-govDeposit/00003.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 added tests_zemu/snapshots/fl-govDeposit/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 added tests_zemu/snapshots/fl-govDeposit/00005.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 added tests_zemu/snapshots/fl-ibc_denoms/00000.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 added tests_zemu/snapshots/fl-ibc_denoms/00001.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 added tests_zemu/snapshots/fl-ibc_denoms/00002.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 added tests_zemu/snapshots/fl-ibc_denoms/00003.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 added tests_zemu/snapshots/fl-ibc_denoms/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 added tests_zemu/snapshots/fl-ibc_denoms/00005.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 added tests_zemu/snapshots/fl-mainmenu/00000.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 added tests_zemu/snapshots/fl-mainmenu/00001.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 added tests_zemu/snapshots/fl-mainmenu/00002.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 added tests_zemu/snapshots/fl-mainmenu/00003.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 added tests_zemu/snapshots/fl-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 added tests_zemu/snapshots/fl-mainmenu/00005.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 added tests_zemu/snapshots/fl-mainmenu/00006.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 added tests_zemu/snapshots/fl-msgMultiSend/00000.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 added tests_zemu/snapshots/fl-msgMultiSend/00001.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 added tests_zemu/snapshots/fl-msgMultiSend/00002.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 added tests_zemu/snapshots/fl-msgMultiSend/00003.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 added tests_zemu/snapshots/fl-msgMultiSend/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 added tests_zemu/snapshots/fl-msgMultiSend/00005.png
Binary file added tests_zemu/snapshots/fl-msgMultiSend/00006.png
Binary file added tests_zemu/snapshots/fl-msgMultiSend/00007.png
Binary file added tests_zemu/snapshots/fl-show_address/00000.png
Binary file added tests_zemu/snapshots/fl-show_address/00001.png
Binary file added tests_zemu/snapshots/fl-show_address/00002.png
Binary file added tests_zemu/snapshots/fl-sign_basic/00000.png
Binary file added tests_zemu/snapshots/fl-sign_basic/00001.png
Binary file added tests_zemu/snapshots/fl-sign_basic/00002.png
Binary file added tests_zemu/snapshots/fl-sign_basic/00003.png
Binary file added tests_zemu/snapshots/fl-sign_basic/00004.png
Binary file added tests_zemu/snapshots/fl-sign_basic2/00000.png
Binary file added tests_zemu/snapshots/fl-sign_basic2/00001.png
Binary file added tests_zemu/snapshots/fl-sign_basic2/00002.png
Binary file added tests_zemu/snapshots/fl-sign_basic2/00003.png
Binary file added tests_zemu/snapshots/fl-sign_basic2/00004.png
Binary file added tests_zemu/snapshots/fl-sign_basic_eth/00000.png
Binary file added tests_zemu/snapshots/fl-sign_basic_eth/00002.png
Binary file added tests_zemu/snapshots/fl-sign_basic_eth/00004.png
Binary file added tests_zemu/snapshots/fl-sign_basic_eth/00005.png
Binary file added tests_zemu/snapshots/fl-sign_basic_eth/00006.png
Binary file modified tests_zemu/snapshots/s-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/s-mainmenu/00010.png
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-govDeposit/00000.png
Binary file modified tests_zemu/snapshots/st-govDeposit/00001.png
Binary file modified tests_zemu/snapshots/st-govDeposit/00002.png
Binary file modified tests_zemu/snapshots/st-govDeposit/00003.png
Binary file modified tests_zemu/snapshots/st-govDeposit/00004.png
Binary file modified tests_zemu/snapshots/st-ibc_denoms/00000.png
Binary file modified tests_zemu/snapshots/st-ibc_denoms/00001.png
Binary file modified tests_zemu/snapshots/st-ibc_denoms/00002.png
Binary file modified tests_zemu/snapshots/st-ibc_denoms/00003.png
Binary file modified tests_zemu/snapshots/st-ibc_denoms/00004.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00000.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/st-mainmenu/00005.png
Binary file added tests_zemu/snapshots/st-mainmenu/00006.png
Binary file modified tests_zemu/snapshots/st-msgMultiSend/00000.png
Binary file modified tests_zemu/snapshots/st-msgMultiSend/00001.png
Binary file modified tests_zemu/snapshots/st-msgMultiSend/00002.png
Binary file modified tests_zemu/snapshots/st-msgMultiSend/00003.png
Binary file modified tests_zemu/snapshots/st-msgMultiSend/00004.png
Binary file modified tests_zemu/snapshots/st-msgMultiSend/00005.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress-eth/00000.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress-eth/00001.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress-eth/00002.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress-eth/00003.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress-eth/00004.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress-eth/00005.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress/00000.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress/00001.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress/00002.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress/00003.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress/00004.png
Binary file modified tests_zemu/snapshots/st-setWithdrawAddress/00005.png
Binary file modified tests_zemu/snapshots/st-show_address/00000.png
Binary file modified tests_zemu/snapshots/st-show_address/00001.png
Binary file modified tests_zemu/snapshots/st-show_address/00002.png
Binary file modified tests_zemu/snapshots/st-show_address_huge/00000.png
Binary file modified tests_zemu/snapshots/st-show_address_huge/00001.png
Binary file modified tests_zemu/snapshots/st-show_address_huge/00002.png
Binary file modified tests_zemu/snapshots/st-show_address_huge/00003.png
Binary file modified tests_zemu/snapshots/st-show_eth_address/00000.png
Binary file modified tests_zemu/snapshots/st-show_eth_address/00001.png
Binary file modified tests_zemu/snapshots/st-show_eth_address/00002.png
Binary file modified tests_zemu/snapshots/st-show_eth_address/00003.png
Binary file modified tests_zemu/snapshots/st-sign_basic/00000.png
Binary file modified tests_zemu/snapshots/st-sign_basic/00001.png
Binary file modified tests_zemu/snapshots/st-sign_basic/00002.png
Binary file modified tests_zemu/snapshots/st-sign_basic/00003.png
Binary file modified tests_zemu/snapshots/st-sign_basic/00004.png
Binary file modified tests_zemu/snapshots/st-sign_basic2/00000.png
Binary file modified tests_zemu/snapshots/st-sign_basic2/00001.png
Binary file modified tests_zemu/snapshots/st-sign_basic2/00002.png
Binary file modified tests_zemu/snapshots/st-sign_basic2/00003.png
Binary file modified tests_zemu/snapshots/st-sign_basic2/00004.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth/00000.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth/00001.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth/00002.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth/00003.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth/00004.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth/00005.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth_warning/00000.png
Binary file modified tests_zemu/snapshots/st-sign_basic_eth_warning/00001.png
Binary file modified tests_zemu/snapshots/st-sign_basic_extra_fields/00000.png
Binary file modified tests_zemu/snapshots/st-sign_basic_extra_fields/00001.png
Binary file modified tests_zemu/snapshots/st-sign_basic_extra_fields/00002.png
Binary file modified tests_zemu/snapshots/st-sign_basic_extra_fields/00003.png
Binary file modified tests_zemu/snapshots/st-sign_basic_extra_fields/00004.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic/00000.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic/00001.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic/00002.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic/00003.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic/00004.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic/00005.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00000.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00001.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00002.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00003.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00004.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00005.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00006.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth/00007.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth_warning/00000.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_eth_warning/00001.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00000.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00001.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00002.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00003.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00004.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00005.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00006.png
Binary file modified tests_zemu/snapshots/st-textual-sign_basic_expert/00007.png
Binary file modified tests_zemu/snapshots/x-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/x-mainmenu/00010.png
11 changes: 6 additions & 5 deletions tests_zemu/tests/amino.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** ******************************************************************************
* (c) 2018-2022 Zondax GmbH
* (c) 2018 - 2024 Zondax AG
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
******************************************************************************* */

import Zemu, { ClickNavigation, TouchNavigation } from '@zondax/zemu'
import Zemu, { ClickNavigation, TouchNavigation, isTouchDevice } from '@zondax/zemu'
// @ts-ignore
import { CosmosApp } from '@zondax/ledger-cosmos-js'
import {
Expand All @@ -33,7 +33,7 @@ import {
import secp256k1 from 'secp256k1/elliptic'
// @ts-ignore
import crypto from 'crypto'
import { ButtonKind, IButton } from '@zondax/zemu/dist/types'
import { ButtonKind, IButton, SwipeDirection } from '@zondax/zemu/dist/types'

jest.setTimeout(120000)

Expand Down Expand Up @@ -496,13 +496,14 @@ describe('Amino', function () {
// Wait until we are not in the main menu
await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot())
let nav = undefined;
if (m.name === 'stax') {
if (isTouchDevice(m.name)) {
const okButton: IButton = {
x: 200,
y: 540,
delay: 0.25,
direction: SwipeDirection.NoSwipe,
};
nav = new TouchNavigation([
nav = new TouchNavigation(m.name, [
ButtonKind.ConfirmYesButton,
]);
nav.schedule[0].button = okButton;
Expand Down
Loading

0 comments on commit c88771a

Please sign in to comment.