From 3262b6962a79ca6e652d48b41ee7859645e9faf4 Mon Sep 17 00:00:00 2001 From: tdejoigny-ledger Date: Tue, 5 Nov 2024 10:53:17 +0100 Subject: [PATCH 1/2] udpate the polkadot branch in CI for swap tests --- .github/workflows/reusable_swap_functional_tests.yml | 8 ++++---- test/python/conftest.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable_swap_functional_tests.yml b/.github/workflows/reusable_swap_functional_tests.yml index b6382933..0dd0edd6 100644 --- a/.github/workflows/reusable_swap_functional_tests.yml +++ b/.github/workflows/reusable_swap_functional_tests.yml @@ -77,7 +77,7 @@ on: branch_for_polkadot: required: false - default: 'fbe/fix_new_swap_implem_rebased' + default: 'develop' type: string repo_for_polkadot: required: false @@ -149,9 +149,9 @@ jobs: - name: solana repo: ${{ inputs.repo_for_solana }} branch: ${{ inputs.branch_for_solana }} - # - name: DOT - # repo: ${{ inputs.repo_for_polkadot }} - # branch: ${{ inputs.branch_for_polkadot }} + - name: DOT + repo: ${{ inputs.repo_for_polkadot }} + branch: ${{ inputs.branch_for_polkadot }} - name: tron repo: ${{ inputs.repo_for_tron }} branch: ${{ inputs.branch_for_tron }} diff --git a/test/python/conftest.py b/test/python/conftest.py index b25de255..233cb6f4 100644 --- a/test/python/conftest.py +++ b/test/python/conftest.py @@ -23,7 +23,7 @@ "litecoin": "Litecoin", "stellar": "Stellar", "solana": "Solana", - # "DOT": "Polkadot", + "DOT": "Polkadot", "tron": "Tron", "ton": "TON", } From 37adcf9b9cc9d2efa1e9faa0e22232fddee58d27 Mon Sep 17 00:00:00 2001 From: tdejoigny-ledger Date: Tue, 5 Nov 2024 18:05:17 +0100 Subject: [PATCH 2/2] fix the extra data test for NanoS --- test/python/test_extra_data.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/python/test_extra_data.py b/test/python/test_extra_data.py index 471f8530..20ce5b0c 100644 --- a/test/python/test_extra_data.py +++ b/test/python/test_extra_data.py @@ -49,7 +49,7 @@ class TestExtraData: ConfForTest(payin_extra_id="abcdefghijklmnopqrs", payin_extra_data=None, valid=True), - # Having only one is allowed + # Having only one is allowed (except for NanoS) ConfForTest(payin_extra_id=None, payin_extra_data=bytes.fromhex("01000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"), valid=True), @@ -58,7 +58,7 @@ class TestExtraData: payin_extra_data=bytes.fromhex("00"), valid=True), ]) - def test_extra_data_and_or_extra_id(self, backend, configurations): + def test_extra_data_and_or_extra_id(self, backend, configurations, firmware): ex = ExchangeClient(backend, Rate.FIXED, SubCommand.SWAP_NG) partner = SigningAuthority(curve=get_partner_curve(SubCommand.SWAP_NG), name="Default name") @@ -84,7 +84,11 @@ def test_extra_data_and_or_extra_id(self, backend, configurations): fees = 339 - tx, tx_signature = craft_and_sign_tx(SubCommand.SWAP_NG, tx_infos, transaction_id, fees, partner) + tx, _ = craft_and_sign_tx(SubCommand.SWAP_NG, tx_infos, transaction_id, fees, partner) + + # NanoS does not support payin_extra_data + if firmware.device == "nanos" and configurations.payin_extra_id is None and configurations.payin_extra_data == bytes.fromhex("01000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"): + configurations.valid = False if configurations.valid: ex.process_transaction(tx)