mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 01:18:28 +00:00
trezorctl: add passphrase_source handling to apply_settings
This commit is contained in:
parent
3ac96f5b00
commit
a0dd3ee502
@ -203,6 +203,13 @@ def set_label(connect, label):
|
||||
return connect().apply_settings(label=label)
|
||||
|
||||
|
||||
@cli.command(help='Set passphrase source.')
|
||||
@click.argument('source', type=int)
|
||||
@click.pass_obj
|
||||
def set_passphrase_source(connect, source):
|
||||
return connect().apply_settings(passphrase_source=source)
|
||||
|
||||
|
||||
@cli.command(help='Set device flags.')
|
||||
@click.argument('flags')
|
||||
@click.pass_obj
|
||||
|
@ -643,7 +643,7 @@ class ProtocolMixin(object):
|
||||
|
||||
@field('message')
|
||||
@expect(proto.Success)
|
||||
def apply_settings(self, label=None, language=None, use_passphrase=None, homescreen=None):
|
||||
def apply_settings(self, label=None, language=None, use_passphrase=None, homescreen=None, passphrase_source=None):
|
||||
settings = proto.ApplySettings()
|
||||
if label is not None:
|
||||
settings.label = label
|
||||
@ -653,6 +653,8 @@ class ProtocolMixin(object):
|
||||
settings.use_passphrase = use_passphrase
|
||||
if homescreen is not None:
|
||||
settings.homescreen = homescreen
|
||||
if passphrase_source is not None:
|
||||
settings.passphrase_source = passphrase_source
|
||||
|
||||
out = self.call(settings)
|
||||
self.init_device() # Reload Features
|
||||
|
Loading…
Reference in New Issue
Block a user