Skip to content

Commit

Permalink
Merge pull request #4 from functori/palmer@functori@set-tezos-new-app…
Browse files Browse the repository at this point in the history
…-ticker-to-XTZ

Set tezos-new app ticker to XTZ
ajinkyaraj-23 authored Nov 23, 2023
2 parents b100690 + 538ee09 commit 1f64294
Showing 124 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -13,6 +13,6 @@ jobs:
uses: ./.github/workflows/reusable_swap_functional_tests.yml
with:
branch_for_exchange: ${{ github.ref }}
branch_for_tezos: 'ajinkyaraj-23@Change-Layout-for-Review-Operation'
branch_for_tezos: '132-wallet-change-ticker-to-xtz'
run_for_devices: '["nanos", "nanosp"]'
test_filter: '"tezos_new"'
5 changes: 1 addition & 4 deletions test/python/apps/cal.py
Original file line number Diff line number Diff line change
@@ -11,8 +11,7 @@
from .stellar import XLM_PACKED_DERIVATION_PATH, XLM_CONF
from .solana_utils import SOL_PACKED_DERIVATION_PATH, SOL_CONF
from .xrp import XRP_PACKED_DERIVATION_PATH, XRP_CONF
from .tezos_legacy import XTZ_PACKED_DERIVATION_PATH, XTZ_CONF
from .tezos_new import NTZ_PACKED_DERIVATION_PATH, NTZ_CONF
from .tezos_new import XTZ_PACKED_DERIVATION_PATH, XTZ_CONF
from .bsc import BSC_PACKED_DERIVATION_PATH, BSC_CONF
from .polkadot import DOT_PACKED_DERIVATION_PATH, DOT_CONF
from .tron import TRX_PACKED_DERIVATION_PATH, TRX_CONF
@@ -27,7 +26,6 @@
"SOL": SOL_CONF,
"XRP": XRP_CONF,
"XTZ": XTZ_CONF,
"NTZ": NTZ_CONF,
"BSC": BSC_CONF,
"DOT": DOT_CONF,
"TRX": TRX_CONF,
@@ -46,7 +44,6 @@
"SOL": SOL_PACKED_DERIVATION_PATH,
"XRP": XRP_PACKED_DERIVATION_PATH,
"XTZ": XTZ_PACKED_DERIVATION_PATH,
"NTZ": NTZ_PACKED_DERIVATION_PATH,
"BSC": BSC_PACKED_DERIVATION_PATH,
"DOT": DOT_PACKED_DERIVATION_PATH,
"TRX": TRX_PACKED_DERIVATION_PATH,
8 changes: 4 additions & 4 deletions test/python/apps/tezos_new.py
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@
from ragger.utils import create_currency_config, RAPDU


NTZ_CONF = create_currency_config("NTZ", "Tezos Wallet", ("TZ", 6))
XTZ_CONF = create_currency_config("XTZ", "Tezos Wallet", ("XTZ", 6))

NTZ_PACKED_DERIVATION_PATH = pack_derivation_path("m/44'/1729'/0'")
XTZ_PACKED_DERIVATION_PATH = pack_derivation_path("m/44'/1729'/0'")

HASH_SIZE = 20

@@ -179,14 +179,14 @@ def _exchange_async(self, ins: INS, index: INDEX, payload: bytes = b"") -> Gener
yield

def get_public_key(self) -> RAPDU:
return self._exchange(INS.GET_PUBLIC_KEY, P1.FIRST, payload=NTZ_PACKED_DERIVATION_PATH)
return self._exchange(INS.GET_PUBLIC_KEY, P1.FIRST, payload=XTZ_PACKED_DERIVATION_PATH)

def sign_message(self, ins: INS = INS.SIGN_WITH_HASH, message: bytes = b"") -> RAPDU:

# todo: send the message by chunk instead of fail
assert len(message) <= MAX_PAYLOAD_SIZE, "Message to send is too long"

first_rapdu = self._exchange(ins, P1.FIRST, NTZ_PACKED_DERIVATION_PATH)
first_rapdu = self._exchange(ins, P1.FIRST, XTZ_PACKED_DERIVATION_PATH)
if first_rapdu.status != StatusCode.STATUS_OK:
return first_rapdu

Binary file modified test/python/snapshots/nanos/test_tezos_fund_valid_1/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 test/python/snapshots/nanos/test_tezos_fund_valid_1/00004.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.
Binary file modified test/python/snapshots/nanos/test_tezos_fund_valid_2/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 test/python/snapshots/nanos/test_tezos_fund_valid_2/00004.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.
Binary file modified test/python/snapshots/nanos/test_tezos_fund_wrong_amount/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 test/python/snapshots/nanos/test_tezos_fund_wrong_amount/00004.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.
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 test/python/snapshots/nanos/test_tezos_fund_wrong_fees/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 test/python/snapshots/nanos/test_tezos_fund_wrong_fees/00004.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.
Binary file modified test/python/snapshots/nanos/test_tezos_sell_valid_1/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 test/python/snapshots/nanos/test_tezos_sell_valid_1/00004.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.
Binary file modified test/python/snapshots/nanos/test_tezos_sell_valid_2/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 test/python/snapshots/nanos/test_tezos_sell_valid_2/00004.png
Binary file modified test/python/snapshots/nanos/test_tezos_sell_wrong_amount/00002.png
Binary file modified test/python/snapshots/nanos/test_tezos_sell_wrong_amount/00004.png
Binary file modified test/python/snapshots/nanos/test_tezos_sell_wrong_fees/00002.png
Binary file modified test/python/snapshots/nanos/test_tezos_sell_wrong_fees/00004.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_valid_1/00001.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_valid_1/00003.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_valid_2/00001.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_valid_2/00003.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_wrong_amount/00001.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_wrong_amount/00003.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_wrong_fees/00001.png
Binary file modified test/python/snapshots/nanos/test_tezos_swap_wrong_fees/00003.png
Binary file modified test/python/snapshots/nanosp/test_tezos_fund_valid_1/00002.png
Binary file modified test/python/snapshots/nanosp/test_tezos_fund_valid_1/00004.png
Binary file modified test/python/snapshots/nanosp/test_tezos_fund_valid_2/00002.png
Binary file modified test/python/snapshots/nanosp/test_tezos_fund_valid_2/00004.png
Binary file modified test/python/snapshots/nanosp/test_tezos_fund_wrong_fees/00002.png
Binary file modified test/python/snapshots/nanosp/test_tezos_fund_wrong_fees/00004.png
Binary file modified test/python/snapshots/nanosp/test_tezos_sell_valid_1/00002.png
Binary file modified test/python/snapshots/nanosp/test_tezos_sell_valid_1/00004.png
Binary file modified test/python/snapshots/nanosp/test_tezos_sell_valid_2/00002.png
Binary file modified test/python/snapshots/nanosp/test_tezos_sell_valid_2/00004.png
Binary file modified test/python/snapshots/nanosp/test_tezos_sell_wrong_fees/00002.png
Binary file modified test/python/snapshots/nanosp/test_tezos_sell_wrong_fees/00004.png
Binary file modified test/python/snapshots/nanosp/test_tezos_swap_valid_1/00001.png
Binary file modified test/python/snapshots/nanosp/test_tezos_swap_valid_1/00003.png
Binary file modified test/python/snapshots/nanosp/test_tezos_swap_valid_2/00001.png
Binary file modified test/python/snapshots/nanosp/test_tezos_swap_valid_2/00003.png
Binary file modified test/python/snapshots/nanosp/test_tezos_swap_wrong_fees/00001.png
Binary file modified test/python/snapshots/nanosp/test_tezos_swap_wrong_fees/00003.png
2 changes: 1 addition & 1 deletion test/python/test_tezos_new.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@

# ExchangeTestRunner implementation for Tezos
class TezosTests(ExchangeTestRunner):
currency_ticker = "NTZ"
currency_ticker = "XTZ"
valid_destination_1 = encode_address("e6330795ffe18f873b83cb13662442b87bd98c22")
valid_destination_memo_1 = ""
valid_destination_2 = encode_address("e6330795ffe18f873b83cb13662442b87bd98c40")

0 comments on commit 1f64294

Please sign in to comment.