mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 14:58:09 +00:00
python: add slip39 option to device recovery
This commit is contained in:
parent
f726d58c55
commit
ab028965fe
@ -505,6 +505,7 @@ def recovery_device(
|
|||||||
@click.option("-u", "--u2f-counter", default=0)
|
@click.option("-u", "--u2f-counter", default=0)
|
||||||
@click.option("-s", "--skip-backup", is_flag=True)
|
@click.option("-s", "--skip-backup", is_flag=True)
|
||||||
@click.option("-n", "--no-backup", is_flag=True)
|
@click.option("-n", "--no-backup", is_flag=True)
|
||||||
|
@click.option("-x", "--slip39", is_flag=True)
|
||||||
@click.pass_obj
|
@click.pass_obj
|
||||||
def reset_device(
|
def reset_device(
|
||||||
connect,
|
connect,
|
||||||
@ -516,6 +517,7 @@ def reset_device(
|
|||||||
u2f_counter,
|
u2f_counter,
|
||||||
skip_backup,
|
skip_backup,
|
||||||
no_backup,
|
no_backup,
|
||||||
|
slip39,
|
||||||
):
|
):
|
||||||
if strength:
|
if strength:
|
||||||
strength = int(strength)
|
strength = int(strength)
|
||||||
@ -530,6 +532,7 @@ def reset_device(
|
|||||||
u2f_counter=u2f_counter,
|
u2f_counter=u2f_counter,
|
||||||
skip_backup=skip_backup,
|
skip_backup=skip_backup,
|
||||||
no_backup=no_backup,
|
no_backup=no_backup,
|
||||||
|
slip39=slip39,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +103,6 @@ def wipe(client):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
@expect(proto.Success, field="message")
|
|
||||||
def recover(
|
def recover(
|
||||||
client,
|
client,
|
||||||
word_count=24,
|
word_count=24,
|
||||||
@ -168,6 +167,7 @@ def reset(
|
|||||||
u2f_counter=0,
|
u2f_counter=0,
|
||||||
skip_backup=False,
|
skip_backup=False,
|
||||||
no_backup=False,
|
no_backup=False,
|
||||||
|
slip39=False,
|
||||||
):
|
):
|
||||||
if client.features.initialized:
|
if client.features.initialized:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
@ -191,6 +191,7 @@ def reset(
|
|||||||
u2f_counter=u2f_counter,
|
u2f_counter=u2f_counter,
|
||||||
skip_backup=bool(skip_backup),
|
skip_backup=bool(skip_backup),
|
||||||
no_backup=bool(no_backup),
|
no_backup=bool(no_backup),
|
||||||
|
slip39=bool(slip39),
|
||||||
)
|
)
|
||||||
|
|
||||||
resp = client.call(msg)
|
resp = client.call(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user