Skip to content

Commit

Permalink
Merge pull request #19 from Zondax/dev
Browse files Browse the repository at this point in the history
Display amounts in AXL for testnet
  • Loading branch information
ftheirs authored Sep 30, 2022
2 parents 737d496 + c195b60 commit baea303
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
run: |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
make deps
brew install conan
conan config install https://github.com/conan-io/conanclientcert.git
- run: cmake -DCMAKE_BUILD_TYPE=Debug . && make
- run: GTEST_COLOR=1 ASAN_OPTIONS=detect_leaks=0 ctest -VV

Expand Down Expand Up @@ -209,4 +207,4 @@ jobs:
files: ./app/pkg/installer_nanos_plus.sh
tag_name: ${{ steps.nanosp.outputs.tag_name }}
draft: false
prerelease: false
prerelease: false
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=0
# This is the patch version of this release
APPVERSION_P=3
APPVERSION_P=4
1 change: 1 addition & 0 deletions app/src/coin.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ typedef enum {
#define APPVERSION_LINE2 ("v" APPVERSION)

#define COIN_DEFAULT_CHAINID "axelar-dojo-1"
#define COIN_DEFAULT_TESTNETID "axelar-testnet-lisbon-3"

#define COIN_DEFAULT_DENOM_BASE "uaxl"
#define COIN_DEFAULT_DENOM_REPR "AXL"
Expand Down
8 changes: 6 additions & 2 deletions app/src/tx_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ __Z_INLINE parser_error_t calculate_is_default_chainid() {

// get chain_id
char outKey[2];
char outVal[20];
char outVal[25];
uint8_t pageCount;
INIT_QUERY_CONTEXT(outKey, sizeof(outKey),
outVal, sizeof(outVal),
Expand All @@ -111,10 +111,14 @@ __Z_INLINE parser_error_t calculate_is_default_chainid() {
zemu_log_stack(outVal);
zemu_log_stack(COIN_DEFAULT_CHAINID);

if (strcmp(outVal, COIN_DEFAULT_CHAINID) == 0) {
if (strncmp(outVal, COIN_DEFAULT_CHAINID, sizeof(COIN_DEFAULT_CHAINID) -1) == 0) {
// If we don't match the default chainid, switch to expert mode
display_cache.is_default_chain = true;
zemu_log_stack("DEFAULT Chain ");
} else if (strncmp(outVal, COIN_DEFAULT_TESTNETID, sizeof(COIN_DEFAULT_TESTNETID) -1) == 0) {
// If we don't match the testnet chainid, switch to expert mode
display_cache.is_default_chain = true;
zemu_log_stack("TESTNET Chain ");
} else {
zemu_log_stack("Chain is NOT DEFAULT");
}
Expand Down
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.
Binary file modified tests_zemu/snapshots/sp-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/sp-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.
Binary file modified tests_zemu/snapshots/x-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/x-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.

0 comments on commit baea303

Please sign in to comment.