add message about successful master seed recovery when trying to use master as tmp

(cherry picked from commit ac761c23d5)
This commit is contained in:
scgbckbone 2024-10-28 16:29:00 +01:00
parent 53b7aae325
commit ebf824a7f0
3 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,8 @@ This lists the new changes that have not yet been published in a normal release.
- Enhancement: Hide Secure Notes & Passwords in Deltamode. Wipe seed if notes menu accessed.
- Enhancement: Hide Seed Vault in Deltamode. Wipe seed if Seed Vault menu accessed.
- Enhancement: Ability to switch between BIP-32 XPUB and SLIP-132 garbage in `Export XPUB`
- Enhancement: Use the fact that master seed cannot be used as ephemeral and add UX message
for successful master seed verification.
- Bugfix: Sometimes see a struck screen after _Verifying..._ in boot up sequence.
On Q, result is blank screen, on Mk4, result is three-dots screen.
- Bugfix: Do not allow to enable/disable Seed Vault feature when in temporary seed mode
@ -17,7 +19,6 @@ This lists the new changes that have not yet been published in a normal release.
- Change: Testnet3 -> Testnet4 (all parameters are the same)
# Mk4 Specific Changes
## 5.4.1 - 2024-??-??

View File

@ -473,6 +473,7 @@ class PinAttempt:
def tmp_secret(self, encoded, chain=None, bip39pw=''):
# Use indicated secret and stop using the SE; operate like this until reboot
from glob import settings
from utils import xfp2str
from nvstore import SettingsObject
val = bytes(encoded + bytes(AE_SECRET_LEN - len(encoded)))
@ -483,7 +484,9 @@ class PinAttempt:
target_nvram_key = None
if encoded is not None:
# disallow using master seed as temporary
master_err = "Cannot use master seed as temporary."
xfp = xfp2str(settings.master_get("xfp", 0))
master_err = ("Cannot use master seed as temporary. BUT you have just successfully "
"tested recovery of your master seed [%s].") % xfp
target_nvram_key = settings.hash_key(val)
if SettingsObject.master_nvram_key:
assert self.tmp_value

View File

@ -1405,6 +1405,7 @@ def test_import_master_as_tmp(reset_seed_words, goto_eph_seed_menu, cap_story,
title, story = cap_story()
assert "FAILED" == title
assert 'Cannot use master seed as temporary.' in story
assert 'tested recovery of your master seed' in story
press_cancel()
# go to ephemeral seed and then try to create new ephemeral seed from master
@ -1433,6 +1434,7 @@ def test_import_master_as_tmp(reset_seed_words, goto_eph_seed_menu, cap_story,
title, story = cap_story()
assert "FAILED" == title
assert 'Cannot use master seed as temporary.' in story
assert 'tested recovery of your master seed' in story
press_cancel()
# now import same seed but represented as master extended key