1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00

python: add slip39 option to device recovery

This commit is contained in:
Tomas Susanka 2019-04-26 11:45:52 +02:00
parent f726d58c55
commit ab028965fe
2 changed files with 5 additions and 1 deletions

View File

@ -505,6 +505,7 @@ def recovery_device(
@click.option("-u", "--u2f-counter", default=0)
@click.option("-s", "--skip-backup", is_flag=True)
@click.option("-n", "--no-backup", is_flag=True)
@click.option("-x", "--slip39", is_flag=True)
@click.pass_obj
def reset_device(
connect,
@ -516,6 +517,7 @@ def reset_device(
u2f_counter,
skip_backup,
no_backup,
slip39,
):
if strength:
strength = int(strength)
@ -530,6 +532,7 @@ def reset_device(
u2f_counter=u2f_counter,
skip_backup=skip_backup,
no_backup=no_backup,
slip39=slip39,
)

View File

@ -103,7 +103,6 @@ def wipe(client):
return ret
@expect(proto.Success, field="message")
def recover(
client,
word_count=24,
@ -168,6 +167,7 @@ def reset(
u2f_counter=0,
skip_backup=False,
no_backup=False,
slip39=False,
):
if client.features.initialized:
raise RuntimeError(
@ -191,6 +191,7 @@ def reset(
u2f_counter=u2f_counter,
skip_backup=bool(skip_backup),
no_backup=bool(no_backup),
slip39=bool(slip39),
)
resp = client.call(msg)