mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +00:00
client: improve passphrase state handling
This commit is contained in:
parent
2733fae057
commit
832c47a278
@ -165,8 +165,11 @@ class TrezorClient:
|
|||||||
self.call_raw(messages.Cancel())
|
self.call_raw(messages.Cancel())
|
||||||
raise ValueError("Passphrase too long")
|
raise ValueError("Passphrase too long")
|
||||||
|
|
||||||
resp = self.call_raw(messages.PassphraseAck(passphrase=passphrase))
|
resp = self.call_raw(
|
||||||
|
messages.PassphraseAck(passphrase=passphrase, state=self.state)
|
||||||
|
)
|
||||||
if isinstance(resp, messages.PassphraseStateRequest):
|
if isinstance(resp, messages.PassphraseStateRequest):
|
||||||
|
# TODO report to the user that the passphrase has changed?
|
||||||
self.state = resp.state
|
self.state = resp.state
|
||||||
return self.call_raw(messages.PassphraseStateAck())
|
return self.call_raw(messages.PassphraseStateAck())
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user