Skip to content

Commit

Permalink
Merge pull request #6 from SiaFoundation/ledger-pr (B2CA-1262)
Browse files Browse the repository at this point in the history
Misc. Fixes
  • Loading branch information
tdejoigny-ledger authored Jul 18, 2024
2 parents 7b1b096 + f7af6a1 commit 8895e0c
Show file tree
Hide file tree
Showing 43 changed files with 22 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ APP_SOURCE_PATH += src

# Application icons following guidelines:
# https://developers.ledger.com/docs/embedded-app/design-requirements/#device-icon
ICON_NANOS = nanos_app_sia.gif
ICON_NANOX = nanox_app_sia.gif
ICON_NANOSP = nanos2_app_sia.gif
ICON_STAX = stax_app_sia_big.gif
ICON_NANOS = icons/nanos_app_sia.gif
ICON_NANOX = icons/nanox_app_sia.gif
ICON_NANOSP = icons/nanos2_app_sia.gif
ICON_STAX = icons/stax_app_sia.gif

# Application allowed derivation curves.
# Possibles curves are: secp256k1, secp256r1, ed25519 and bls12381g1
Expand Down
File renamed without changes
Binary file added icons/nanos2_app_sia.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
5 changes: 4 additions & 1 deletion ledger_app.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[app]
build_directory = "./"
sdk = "C"
devices = ["nanos", "nanox", "nanos+"]
devices = ["nanos", "nanox", "nanos+", "stax"]

[tests]
pytest_directory = "./tests/"
Binary file removed nanos2_app_sia.gif
Binary file not shown.
1 change: 1 addition & 0 deletions src/sia_ux.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <ux.h>
#include "txn.h"
#include "glyphs.h"

#ifdef HAVE_NBGL
#include <nbgl_use_case.h>
Expand Down
Binary file modified tests/snapshots/stax/test_app_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 modified tests/snapshots/stax/test_app_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 modified tests/snapshots/stax/test_app_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 modified tests/snapshots/stax/test_app_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 modified tests/snapshots/stax/test_get_address_confirm_accepted/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 modified tests/snapshots/stax/test_get_address_confirm_accepted/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 modified tests/snapshots/stax/test_get_address_confirm_accepted/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 modified tests/snapshots/stax/test_get_address_confirm_refused/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 modified tests/snapshots/stax/test_get_address_confirm_refused/00001.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/snapshots/stax/test_get_public_key_confirm_accepted/00001.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.
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/snapshots/stax/test_sign_hash_accept/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 modified tests/snapshots/stax/test_sign_hash_accept/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 modified tests/snapshots/stax/test_sign_hash_accept/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 modified tests/snapshots/stax/test_sign_hash_accept/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 modified tests/snapshots/stax/test_sign_hash_reject/00000.png
Binary file modified tests/snapshots/stax/test_sign_hash_reject/00001.png
Binary file modified tests/snapshots/stax/test_sign_tx_accept/00000.png
Binary file modified tests/snapshots/stax/test_sign_tx_accept/00001.png
Binary file modified tests/snapshots/stax/test_sign_tx_accept/00002.png
Binary file modified tests/snapshots/stax/test_sign_tx_accept/00003.png
Binary file modified tests/snapshots/stax/test_sign_tx_accept/00004.png
Binary file modified tests/snapshots/stax/test_sign_tx_accept/00005.png
Binary file modified tests/snapshots/stax/test_sign_tx_accept/00006.png
Binary file modified tests/snapshots/stax/test_sign_tx_refused/00000.png
Binary file modified tests/snapshots/stax/test_sign_tx_refused/00001.png
8 changes: 4 additions & 4 deletions tests/test_pubkey_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_get_public_key_confirm_accepted(firmware, backend, navigator, test_name
)
else:
instructions = [
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM,
]
navigator.navigate_and_compare(
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_get_public_key_confirm_refused(firmware, backend, navigator, test_name)
)
else:
navigator.navigate_and_compare(
ROOT_SCREENSHOT_PATH, test_name, [NavInsID.USE_CASE_REVIEW_REJECT]
ROOT_SCREENSHOT_PATH, test_name, [NavInsID.USE_CASE_VIEW_DETAILS_EXIT]
)

response = client.get_async_response()
Expand All @@ -84,7 +84,7 @@ def test_get_address_confirm_accepted(firmware, backend, navigator, test_name):
)
else:
instructions = [
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM,
]
navigator.navigate_and_compare(
Expand Down Expand Up @@ -117,7 +117,7 @@ def test_get_address_confirm_refused(firmware, backend, navigator, test_name):
)
else:
navigator.navigate_and_compare(
ROOT_SCREENSHOT_PATH, test_name, [NavInsID.USE_CASE_REVIEW_REJECT]
ROOT_SCREENSHOT_PATH, test_name, [NavInsID.USE_CASE_VIEW_DETAILS_EXIT]
)

response = client.get_async_response()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_sign_hash_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def test_sign_hash_accept(firmware, backend, navigator, test_name):
)
else:
instructions = [
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_REVIEW_CONFIRM,
]
navigator.navigate_and_compare(
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_sign_hash_reject(firmware, backend, navigator, test_name):
else:
navigator.navigate_and_compare(
ROOT_SCREENSHOT_PATH, test_name, [
NavInsID.USE_CASE_REVIEW_REJECT,
NavInsID.USE_CASE_VIEW_DETAILS_EXIT,
NavInsID.USE_CASE_CHOICE_CONFIRM,
]
)
Expand Down
12 changes: 6 additions & 6 deletions tests/test_sign_txn_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_sign_tx_refused(firmware, backend, navigator, test_name):
])
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, test_name, instructions)
else:
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, test_name, [NavInsID.USE_CASE_REVIEW_REJECT])
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, test_name, [NavInsID.USE_CASE_VIEW_DETAILS_EXIT])

response = client.get_async_response()
assert response.status == Errors.SW_DENY
Expand Down Expand Up @@ -127,11 +127,11 @@ def test_sign_tx_accept(firmware, backend, navigator, test_name):
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, test_name, instructions)
else:
instructions = [
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.USE_CASE_REVIEW_TAP,
NavInsID.SWIPE_CENTER_TO_LEFT,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_VIEW_DETAILS_NEXT,
NavInsID.USE_CASE_REVIEW_CONFIRM,
]
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, test_name, instructions)
Expand Down

0 comments on commit 8895e0c

Please sign in to comment.