diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 002c873e1..2046aa74d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -4,6 +4,7 @@ env: CAIRO_LANG_VERSION: "0.13.1" DEVNET_VERSION: "0.1.2" DEVNET_SHA: 7e7dbb5 + LEDGER_APP_SHA: dd58c5c on: push: @@ -196,7 +197,8 @@ jobs: image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools options: --rm -v ${{ github.workspace }}:/apps run: | - cd /apps/app-starknet/starknet + cd /apps/app-starknet + git checkout ${{ env.LEDGER_APP_SHA }} cargo clean cargo ledger build nanox diff --git a/docs/guide/signing.rst b/docs/guide/signing.rst index e482ed3d1..49b7b2aa3 100644 --- a/docs/guide/signing.rst +++ b/docs/guide/signing.rst @@ -15,6 +15,7 @@ signing algorithm, it is possible to create ``Account`` with custom Signing with Ledger ------------------- :ref:`LedgerSigner` allows you to sign transactions using a Ledger device. The device must be unlocked and Starknet app needs to be open. +Currently used version of Starknet app is ``1.1.1`` and only blind-signing is possible. Clear-signing will be available in the near future. .. codesnippet:: ../../starknet_py/tests/unit/signer/test_ledger_signer.py :language: python diff --git a/starknet_py/tests/unit/signer/test_ledger_signer.py b/starknet_py/tests/unit/signer/test_ledger_signer.py index daef9dfa9..75392efa9 100644 --- a/starknet_py/tests/unit/signer/test_ledger_signer.py +++ b/starknet_py/tests/unit/signer/test_ledger_signer.py @@ -1,3 +1,5 @@ +from sys import platform + import pytest from starknet_py.common import create_sierra_compiled_contract @@ -18,8 +20,11 @@ from starknet_py.tests.e2e.fixtures.misc import load_contract -# TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec. -@pytest.mark.skip +# TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup. +@pytest.mark.skipif( + platform == "win32", + reason="Testing Ledger is skipped on Windows due to different Speculos setup.", +) def test_init_with_invalid_derivation_path(): with pytest.raises(ValueError, match="Empty derivation path"): LedgerSigner(derivation_path_str="", chain_id=StarknetChainId.SEPOLIA) @@ -76,8 +81,11 @@ def test_init_with_invalid_derivation_path(): ), ], ) -# TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec. -@pytest.mark.skip +# TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup. +@pytest.mark.skipif( + platform == "win32", + reason="Testing Ledger is skipped on Windows due to different Speculos setup.", +) def test_sign_transaction(transaction): # docs: start @@ -97,8 +105,11 @@ def test_sign_transaction(transaction): assert all(i != 0 for i in signature) -# TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec. -@pytest.mark.skip +# TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup. +@pytest.mark.skipif( + platform == "win32", + reason="Testing Ledger is skipped on Windows due to different Speculos setup.", +) def test_create_account_with_ledger_signer(): # pylint: disable=unused-variable signer = LedgerSigner( @@ -132,8 +143,11 @@ async def _get_account_balance_strk(client: FullNodeClient, address: int): @pytest.mark.asyncio -# TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec. -@pytest.mark.skip +# TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup. +@pytest.mark.skipif( + platform == "win32", + reason="Testing Ledger is skipped on Windows due to different Speculos setup.", +) async def test_deploy_account_and_transfer(client): signer = LedgerSigner( derivation_path_str="m/2645'/1195502025'/1470455285'/0'/0'/0",