mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
fix(python/trezorctl): do not prompt twice when enabling force-on-device
fixes #2833
This commit is contained in:
parent
0c5db05357
commit
cc2314d89d
1
python/.changelog.d/2833.fixed
Normal file
1
python/.changelog.d/2833.fixed
Normal file
@ -0,0 +1 @@
|
||||
When enabling passphrase force-on-device, do not also prompt to enable passphrase if it is already enabled.
|
@ -319,8 +319,14 @@ passphrase = cast(AliasedGroup, passphrase_main)
|
||||
@with_client
|
||||
def passphrase_on(client: "TrezorClient", force_on_device: Optional[bool]) -> str:
|
||||
"""Enable passphrase."""
|
||||
if client.features.passphrase_protection is not True:
|
||||
use_passphrase = True
|
||||
else:
|
||||
use_passphrase = None
|
||||
return device.apply_settings(
|
||||
client, use_passphrase=True, passphrase_always_on_device=force_on_device
|
||||
client,
|
||||
use_passphrase=use_passphrase,
|
||||
passphrase_always_on_device=force_on_device,
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user