From 3ebde0ea34d5b2de2a54be1014fe26206076d621 Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Mon, 24 Mar 2025 16:31:05 +0100 Subject: [PATCH] change: "Destroy Seed" purges all Trick PINs from SE2 --- releases/Next-ChangeLog.md | 1 + shared/actions.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/releases/Next-ChangeLog.md b/releases/Next-ChangeLog.md index 49f7c0ba..9ee25cbd 100644 --- a/releases/Next-ChangeLog.md +++ b/releases/Next-ChangeLog.md @@ -29,6 +29,7 @@ This lists the new changes that have not yet been published in a normal release. - Bugfix: Virtual Disk auto mode ignore already signed PSBTs (with "-signed" in file name) - Bugfix: Virtual Disk auto mode stuck on "Reading..." screen - Bugfix: Do not allow to change Main PIN to value already used as Trick PIN even if Trick PIN is hidden +- Change: `Destroy Seed` also removes all Trick PINs from SE2 # Mk4 Specific Changes diff --git a/shared/actions.py b/shared/actions.py index 6c5b2beb..b442f5fb 100644 --- a/shared/actions.py +++ b/shared/actions.py @@ -524,6 +524,7 @@ async def new_from_dice(menu, label, item): async def any_active_duress_ux(): from trick_pins import tp tp.reload() + # if TPs are hidden this msg will not be shown if any(tp.get_duress_pins()): await ux_show_story('You have one or more duress wallets defined ' 'under Trick PINs. Please empty them, and clear ' @@ -579,7 +580,8 @@ async def clear_seed(*a): 'All funds will be lost. ' 'You better have a backup of the seed words. ' 'All settings like multisig wallets are also wiped. ' - 'Saved temporary seed settings and Seed Vault are lost.'): + 'Saved temporary seed settings and Seed Vault are lost. ' + 'Trick PINs are also completely removed.'): return await ux_aborted() if not await ux_confirm('''Are you REALLY sure though???\n\n\ @@ -588,6 +590,10 @@ unless you have a backup of the seed words and know how to import them into a \ new wallet.''', confirm_key='4'): return await ux_aborted() + # clear all trick PINs from SE2 + from trick_pins import tp + tp.clear_all() + # clear settings, address cache, settings from tmp seeds / seedvault seeds from files import wipe_flash_filesystem wipe_flash_filesystem(False)