diff --git a/src/apps/common/mnemonic.py b/src/apps/common/mnemonic.py index 301fa23a8..fc266a0c4 100644 --- a/src/apps/common/mnemonic.py +++ b/src/apps/common/mnemonic.py @@ -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): diff --git a/src/apps/common/seed.py b/src/apps/common/seed.py index 4898c89f6..208988c89 100644 --- a/src/apps/common/seed.py +++ b/src/apps/common/seed.py @@ -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