change: Lock Down Seed needs confirm key (4)

This commit is contained in:
scgbckbone 2025-04-15 10:20:08 +02:00 committed by Peter D. Gray
parent 2441e6044e
commit 176a7f80cb
No known key found for this signature in database
GPG Key ID: A2DCD558C2BE5D7C
3 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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 !!!