mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-15 19:08:07 +00:00
core: store correct backup type during recovery
This commit is contained in:
parent
81f5cbef93
commit
9595800158
@ -97,10 +97,16 @@ async def _finish_recovery_dry_run(
|
|||||||
async def _finish_recovery(
|
async def _finish_recovery(
|
||||||
ctx: wire.Context, secret: bytes, mnemonic_type: int
|
ctx: wire.Context, secret: bytes, mnemonic_type: int
|
||||||
) -> Success:
|
) -> Success:
|
||||||
|
group_count = storage.recovery.get_slip39_group_count()
|
||||||
|
if group_count and group_count > 1:
|
||||||
|
mnemonic_type = mnemonic.TYPE_SLIP39_GROUP
|
||||||
storage.device.store_mnemonic_secret(
|
storage.device.store_mnemonic_secret(
|
||||||
secret, mnemonic_type, needs_backup=False, no_backup=False
|
secret, mnemonic_type, needs_backup=False, no_backup=False
|
||||||
)
|
)
|
||||||
if mnemonic_type == mnemonic.TYPE_SLIP39:
|
if (
|
||||||
|
mnemonic_type == mnemonic.TYPE_SLIP39
|
||||||
|
or mnemonic_type == mnemonic.TYPE_SLIP39_GROUP
|
||||||
|
):
|
||||||
identifier = storage.recovery.get_slip39_identifier()
|
identifier = storage.recovery.get_slip39_identifier()
|
||||||
exponent = storage.recovery.get_slip39_iteration_exponent()
|
exponent = storage.recovery.get_slip39_iteration_exponent()
|
||||||
if identifier is None or exponent is None:
|
if identifier is None or exponent is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user