From ab028965fe97bd623dc2535eff0281dbf44a9ba5 Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Fri, 26 Apr 2019 11:45:52 +0200 Subject: [PATCH] python: add slip39 option to device recovery --- python/trezorctl | 3 +++ python/trezorlib/device.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/python/trezorctl b/python/trezorctl index 2f77e3c14c..9d15f9ceee 100755 --- a/python/trezorctl +++ b/python/trezorctl @@ -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, ) diff --git a/python/trezorlib/device.py b/python/trezorlib/device.py index 245c468bc7..5d2339f228 100644 --- a/python/trezorlib/device.py +++ b/python/trezorlib/device.py @@ -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)