1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00

mnemonic: do not use progress bar for U2F

fixes #523
This commit is contained in:
Tomas Susanka 2019-03-29 14:23:46 +01:00
parent fb8d6fe820
commit 5deeb7d6f5
2 changed files with 7 additions and 4 deletions

View File

@ -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):

View File

@ -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