mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-22 05:10:56 +00:00
fix(trezorlib): re-allow usage of passphrases on codec sessions
[no changelog]
This commit is contained in:
parent
0e3e59f1a1
commit
dbb0d44ca5
@ -154,9 +154,16 @@ class SessionV1(Session):
|
|||||||
resp: messages.Features = self.call_raw(
|
resp: messages.Features = self.call_raw(
|
||||||
messages.Initialize(session_id=session_id, derive_cardano=derive_cardano)
|
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
|
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:
|
def _callback_button(session: Session, msg: t.Any) -> t.Any:
|
||||||
print("Please confirm action on your Trezor device.") # TODO how to handle UI?
|
print("Please confirm action on your Trezor device.") # TODO how to handle UI?
|
||||||
return session.call(messages.ButtonAck())
|
return session.call(messages.ButtonAck())
|
||||||
|
Loading…
Reference in New Issue
Block a user