mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-21 22:08:08 +00:00
core: raise error on setting passphrase-on-device without passphrase
This commit is contained in:
parent
58f460627f
commit
57b08c98ed
@ -43,10 +43,9 @@ async def apply_settings(ctx: wire.Context, msg: ApplySettings):
|
|||||||
await require_confirm_change_passphrase(ctx, msg.use_passphrase)
|
await require_confirm_change_passphrase(ctx, msg.use_passphrase)
|
||||||
storage.device.set_passphrase_enabled(msg.use_passphrase)
|
storage.device.set_passphrase_enabled(msg.use_passphrase)
|
||||||
|
|
||||||
if (
|
if msg.passphrase_always_on_device is not None:
|
||||||
storage.device.is_passphrase_enabled()
|
if not storage.device.is_passphrase_enabled():
|
||||||
and msg.passphrase_always_on_device is not None
|
raise wire.DataError("Passphrase is not enabled")
|
||||||
):
|
|
||||||
await require_confirm_change_passphrase_source(
|
await require_confirm_change_passphrase_source(
|
||||||
ctx, msg.passphrase_always_on_device
|
ctx, msg.passphrase_always_on_device
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user