mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 20:19:23 +00:00
parent
fb8d6fe820
commit
5deeb7d6f5
@ -12,11 +12,14 @@ def get() -> (bytes, int):
|
||||
return mnemonic_secret, mnemonic_type
|
||||
|
||||
|
||||
def get_seed(passphrase: str = ""):
|
||||
def get_seed(passphrase: str = "", progress_bar=True):
|
||||
secret, mnemonic_type = get()
|
||||
_start_progress()
|
||||
if mnemonic_type == TYPE_BIP39:
|
||||
return bip39.seed(secret.decode(), passphrase, _render_progress)
|
||||
module = bip39
|
||||
if progress_bar:
|
||||
_start_progress()
|
||||
return module.seed(secret.decode(), passphrase, _render_progress)
|
||||
return module.seed(secret.decode(), passphrase)
|
||||
|
||||
|
||||
def process(mnemonics: list, mnemonic_type: int):
|
||||
|
@ -76,7 +76,7 @@ def derive_node_without_passphrase(
|
||||
) -> bip32.HDNode:
|
||||
if not storage.is_initialized():
|
||||
raise Exception("Device is not initialized")
|
||||
seed = mnemonic.get_seed()
|
||||
seed = mnemonic.get_seed(progress_bar=False)
|
||||
node = bip32.from_seed(seed, curve_name)
|
||||
node.derive_path(path)
|
||||
return node
|
||||
|
Loading…
Reference in New Issue
Block a user