one instant retry on AE_FAIL

(cherry picked from commit 84215b1721)
This commit is contained in:
scgbckbone 2023-12-13 15:25:47 +01:00 committed by doc-hex
parent f81bb5cd22
commit d7b63d072a
2 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,7 @@
deferring card read (and decryption) until after `Restore Saved` menu item is selected.
- Enhancement: `12 Words` menu option preferred on the top of the menu in all the seed menus
(rather than 24 words).
- Enhancement: One instant retry on SE1 comm failures
- Bugfix: Handle any failures in slot reading when loading settings
- Bugfix: Add missing First Time UX for extended key import as master seed
- Bugfix: Hide `Upgrade Firmware` menu item if temporary seed is active

View File

@ -100,6 +100,12 @@ PIN_ATTEMPT_SIZE = const(248+32)
# small cache of pin-prefix to words, for 608a based systems
_word_cache = []
def retry_ae_fail(*args):
err = ckcc.gate(*args)
if err == -106: # AE_FAIL
err = ckcc.gate(*args)
return err
class BootloaderError(RuntimeError):
pass
@ -252,7 +258,7 @@ class PinAttempt:
#print("> tx: %s" % b2a_hex(buf))
err = ckcc.gate(18, buf, method_num)
err = retry_ae_fail(18, buf, method_num)
#print("[%d] rx: %s" % (err, b2a_hex(buf)))