1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00

client: inline PassphraseState flow into Passphrase flow

This commit is contained in:
matejcik 2018-10-26 14:09:32 +02:00
parent 1218a487f6
commit ea675f1e58

View File

@ -126,10 +126,11 @@ class BaseClient(object):
passphrase = None
else:
passphrase = self.ui.get_passphrase()
return self.call_raw(proto.PassphraseAck(passphrase=passphrase))
def callback_PassphraseStateRequest(self, msg):
self.state = msg.state
state_request = self.call_raw(proto.PassphraseAck(passphrase=passphrase))
if not isinstance(state_request, proto.PassphraseStateRequest):
raise exceptions.TrezorException("Passphrase state missing")
self.state = state_request.state
return self.call_raw(proto.PassphraseStateAck())
def callback_ButtonRequest(self, msg):