diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py index 5145639b98..c671595782 100644 --- a/python/src/trezorlib/debuglink.py +++ b/python/src/trezorlib/debuglink.py @@ -1378,7 +1378,7 @@ class TrezorClientDebugLink(TrezorClient): return send_passphrase(None, None) try: - if isinstance(session, SessionV1): + if session.passphrase is None and isinstance(session, SessionV1): passphrase = self.ui.get_passphrase( available_on_device=available_on_device ) diff --git a/tests/device_tests/reset_recovery/test_reset_recovery_bip39.py b/tests/device_tests/reset_recovery/test_reset_recovery_bip39.py index a1824f54e7..2d478fba87 100644 --- a/tests/device_tests/reset_recovery/test_reset_recovery_bip39.py +++ b/tests/device_tests/reset_recovery/test_reset_recovery_bip39.py @@ -38,7 +38,7 @@ def test_reset_recovery(client: Client): lang = client.features.language or "en" device.wipe(session) client = client.get_new_client() - session = client.get_management_session() + session = Session(client.get_management_session()) set_language(session, lang[:2]) recover(session, mnemonic) session = client.get_session() diff --git a/tests/device_tests/reset_recovery/test_reset_recovery_slip39_advanced.py b/tests/device_tests/reset_recovery/test_reset_recovery_slip39_advanced.py index d77100afbf..f4de1b03c7 100644 --- a/tests/device_tests/reset_recovery/test_reset_recovery_slip39_advanced.py +++ b/tests/device_tests/reset_recovery/test_reset_recovery_slip39_advanced.py @@ -57,7 +57,7 @@ def test_reset_recovery(client: Client): lang = client.features.language or "en" device.wipe(session) client = client.get_new_client() - session = client.get_management_session() + session = Session(client.get_management_session()) set_language(session, lang[:2]) recover(session, combination) session = client.get_session() diff --git a/tests/device_tests/reset_recovery/test_reset_recovery_slip39_basic.py b/tests/device_tests/reset_recovery/test_reset_recovery_slip39_basic.py index ee2f2da48c..f539c2ad44 100644 --- a/tests/device_tests/reset_recovery/test_reset_recovery_slip39_basic.py +++ b/tests/device_tests/reset_recovery/test_reset_recovery_slip39_basic.py @@ -46,7 +46,7 @@ def test_reset_recovery(client: Client): lang = client.features.language or "en" device.wipe(session) client = client.get_new_client() - session = client.get_management_session() + session = Session(client.get_management_session()) set_language(session, lang[:2]) selected_mnemonics = share_subset recover(session, selected_mnemonics) diff --git a/tests/device_tests/test_passphrase_slip39_advanced.py b/tests/device_tests/test_passphrase_slip39_advanced.py index 697ec44270..89a68fb1de 100644 --- a/tests/device_tests/test_passphrase_slip39_advanced.py +++ b/tests/device_tests/test_passphrase_slip39_advanced.py @@ -41,6 +41,7 @@ def test_128bit_passphrase(client: Client): session = client.get_session(passphrase="ROZERT") address_compare = get_test_address(session) assert address != address_compare + assert address_compare == "n1HeeeojjHgQnG6Bf5VWkM1gcpQkkXqSGw" @pytest.mark.setup_client(mnemonic=MNEMONIC_SLIP39_ADVANCED_33, passphrase=True) diff --git a/tests/device_tests/test_session.py b/tests/device_tests/test_session.py index ef801d4b41..45cec6acf2 100644 --- a/tests/device_tests/test_session.py +++ b/tests/device_tests/test_session.py @@ -159,6 +159,7 @@ def test_session_recycling(client: Client): ] ) client.use_passphrase("TREZOR") + _ = get_test_address(session) # address = get_test_address(session) # create and close 100 sessions - more than the session limit