diff --git a/core/src/apps/debug/__init__.py b/core/src/apps/debug/__init__.py index a945f7990..7292cd51c 100644 --- a/core/src/apps/debug/__init__.py +++ b/core/src/apps/debug/__init__.py @@ -42,7 +42,8 @@ if __debug__: from apps.common import storage, mnemonic m = DebugLinkState() - m.mnemonic_secret, m.mnemonic_type = mnemonic.get() + m.mnemonic_secret = mnemonic.get_secret() + m.mnemonic_type = mnemonic.get_type() m.passphrase_protection = storage.device.has_passphrase() m.reset_word_pos = reset_word_index m.reset_entropy = reset_internal_entropy diff --git a/core/src/apps/management/backup_device.py b/core/src/apps/management/backup_device.py index ae758636b..965d39fa6 100644 --- a/core/src/apps/management/backup_device.py +++ b/core/src/apps/management/backup_device.py @@ -12,13 +12,13 @@ async def backup_device(ctx, msg): if not storage.device.needs_backup(): raise wire.ProcessError("Seed already backed up") - mnemonic_secret, mnemonic_module = mnemonic.get() - slip39 = mnemonic_module == mnemonic.slip39 + mnemonic_secret, mnemonic_type = mnemonic.get() + is_slip39 = mnemonic_type == mnemonic.TYPE_SLIP39 storage.device.set_unfinished_backup(True) storage.device.set_backed_up() - if slip39: + if is_slip39: await backup_slip39_wallet(ctx, mnemonic_secret) else: await layout.bip39_show_and_confirm_mnemonic(ctx, mnemonic_secret.decode()) diff --git a/core/src/apps/management/recovery_device/homescreen.py b/core/src/apps/management/recovery_device/homescreen.py index 73b98e6d1..1492d069e 100644 --- a/core/src/apps/management/recovery_device/homescreen.py +++ b/core/src/apps/management/recovery_device/homescreen.py @@ -61,7 +61,7 @@ async def _finish_recovery_dry_run( ctx: wire.Context, secret: bytes, mnemonic_type: int ) -> Success: digest_input = sha256(secret).digest() - stored, _ = mnemonic.get() + stored = mnemonic.get_secret() digest_stored = sha256(stored).digest() result = utils.consteq(digest_stored, digest_input)