From 832c47a278b10666d5910f2da76490b828b26f2b Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 15 Apr 2019 14:38:27 +0200 Subject: [PATCH] client: improve passphrase state handling --- trezorlib/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trezorlib/client.py b/trezorlib/client.py index ee3db7394e..c49ee0ea8f 100644 --- a/trezorlib/client.py +++ b/trezorlib/client.py @@ -165,8 +165,11 @@ class TrezorClient: self.call_raw(messages.Cancel()) 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): + # TODO report to the user that the passphrase has changed? self.state = resp.state return self.call_raw(messages.PassphraseStateAck()) else: