mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-01 03:48:18 +00:00
fix(trezorlib): re-allow usage of passphrases on codec sessions
[no changelog]
This commit is contained in:
parent
89d9c1f816
commit
25559cc245
@ -154,9 +154,16 @@ class SessionV1(Session):
|
||||
resp: messages.Features = self.call_raw(
|
||||
messages.Initialize(session_id=session_id, derive_cardano=derive_cardano)
|
||||
)
|
||||
if isinstance(self.passphrase, str):
|
||||
self.passphrase_callback = _send_passphrase
|
||||
self._id = resp.session_id
|
||||
|
||||
|
||||
def _send_passphrase(session: Session, resp: t.Any) -> None:
|
||||
assert isinstance(session.passphrase, str)
|
||||
return session.call(messages.PassphraseAck(passphrase=session.passphrase))
|
||||
|
||||
|
||||
def _callback_button(session: Session, msg: t.Any) -> t.Any:
|
||||
print("Please confirm action on your Trezor device.") # TODO how to handle UI?
|
||||
return session.call(messages.ButtonAck())
|
||||
|
Loading…
Reference in New Issue
Block a user