move start_b39_pw into seed.py

This commit is contained in:
Peter D. Gray 2024-02-20 10:38:56 -05:00
parent 726180dc36
commit f8a084c5e9
No known key found for this signature in database
GPG Key ID: A2DCD558C2BE5D7C
2 changed files with 2 additions and 33 deletions

View File

@ -503,37 +503,6 @@ More on our website:
.com
""")
async def start_b39_pw(menu, label, item):
if not settings.get('b39skip', False):
ch = await ux_show_story('''\
You may add a passphrase to your BIP-39 seed words. \
This creates an entirely new wallet, for every possible passphrase.
By default, the Coldcard uses an empty string as the passphrase.
On the next menu, you can enter a passphrase by selecting \
individual letters, choosing from the word list (recommended), \
or by typing numbers.
Please write down the fingerprint of all your wallets, so you can \
confirm when you've got the right passphrase. (If you are writing down \
the passphrase as well, it's okay to put them together.) There is no way for \
the Coldcard to know if your password is correct, and if you have it wrong, \
you will be looking at an empty wallet.
Limitations: 100 characters max length, ASCII \
characters 32-126 (0x20-0x7e) only.
OK to continue or press (2) to hide this message forever.
''', escape='2')
if ch == '2':
settings.set('b39skip', True)
if ch == 'x':
return
import seed
return seed.PassphraseMenu()
async def start_seed_import(menu, label, item):
import seed
if version.has_qwerty:
@ -982,7 +951,7 @@ def make_top_menu():
if active_xfp:
ui_xfp = "[" + xfp2str(active_xfp) + "]"
_cls.insert(0, MenuItem(ui_xfp, f=ready2sign))
_cls.append(MenuItem("Restore Master", f=restore_main_secret))
_cls.append(MenuItem("Restore Master", f=restore_main_secret, shortcut='m'))
else:
_cls = EmptyWallet

View File

@ -10,7 +10,7 @@ from actions import *
from choosers import *
from mk4 import dev_enable_repl
from multisig import make_multisig_menu, import_multisig_nfc
from seed import make_ephemeral_seed_menu, make_seed_vault_menu
from seed import make_ephemeral_seed_menu, make_seed_vault_menu, start_b39_pw
from address_explorer import address_explore
from drv_entro import drv_entro_start, password_entry
from backups import clone_start, clone_write_data