From 176a7f80cbbd7b201157b160b5c870eb9a0ef483 Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Tue, 15 Apr 2025 10:20:08 +0200 Subject: [PATCH] change: Lock Down Seed needs confirm key (4) --- releases/Next-ChangeLog.md | 1 + shared/actions.py | 2 +- testing/test_bip39pw.py | 12 +++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/releases/Next-ChangeLog.md b/releases/Next-ChangeLog.md index da2d739a..a72f36b3 100644 --- a/releases/Next-ChangeLog.md +++ b/releases/Next-ChangeLog.md @@ -36,6 +36,7 @@ This lists the new changes that have not yet been published in a normal release. - Bugfix: Finalization of foreign inputs from partial signatures. Thanks Christian Uebber - Bugfix: Temporary seed from COLDCARD backup failed to load stored multisig wallets - Change: `Destroy Seed` also removes all Trick PINs from SE2. +- Change: `Lock Down Seed` requires pressing confirm key (4) to execute # Mk4 Specific Changes diff --git a/shared/actions.py b/shared/actions.py index bf3645a7..520e55fb 100644 --- a/shared/actions.py +++ b/shared/actions.py @@ -561,7 +561,7 @@ async def convert_ephemeral_to_master(*a): msg += 'A reboot is part of this process. ' msg += 'PIN code, and %s funds are not affected.' % _type - if not await ux_confirm(msg): + if not await ux_confirm(msg, confirm_key='4'): return await ux_aborted() # settings.save is part of re-building fs diff --git a/testing/test_bip39pw.py b/testing/test_bip39pw.py index decd2b47..84f44c88 100644 --- a/testing/test_bip39pw.py +++ b/testing/test_bip39pw.py @@ -274,10 +274,9 @@ def test_cancel_on_empty_added_numbers(pick_menu_item, is_q1, cap_menu, @pytest.mark.parametrize('stype', ["bip39pw", "words", "xprv", None]) -def test_lockdown_ux(stype, pick_menu_item, set_bip39_pw, goto_home, - press_cancel, get_setting, reset_seed_words, - generate_ephemeral_words, import_ephemeral_xprv, - press_select, is_q1, cap_story, cap_menu): +def test_lockdown_ux(stype, pick_menu_item, set_bip39_pw, goto_home, is_q1, + get_setting, reset_seed_words, import_ephemeral_xprv, + generate_ephemeral_words, cap_story, cap_menu, press_select): # test UX and operation of the 'seed lockdown' option if stype: @@ -313,7 +312,10 @@ def test_lockdown_ux(stype, pick_menu_item, set_bip39_pw, goto_home, assert "Convert currently used BIP-39 passphrase to master seed" in story assert "but the passphrase itself is erased" in story - press_cancel() + assert "Press (4) to prove you read to the end of this message and accept all consequences" in story + press_select() # enter does not active, sends you back to menu + time.sleep(.1) + assert "Lock Down Seed" in cap_menu() reset_seed_words() # real code does reboot, which is poorly simulated; avoid that # this needs to be tested with real HW !!!