mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-05 21:10:57 +00:00
wip fix cardano part 1
This commit is contained in:
parent
7415c962a6
commit
c15a1b54f5
@ -97,6 +97,7 @@ class SessionV1(Session):
|
||||
session = SessionV1(client, session_id)
|
||||
session.button_callback = client.button_callback
|
||||
session.pin_callback = client.pin_callback
|
||||
session._init_session(derive_cardano=derive_cardano)
|
||||
return session
|
||||
|
||||
def _write(self, msg: t.Any) -> None:
|
||||
@ -109,6 +110,12 @@ class SessionV1(Session):
|
||||
assert isinstance(self.client.protocol, ProtocolV1)
|
||||
return self.client.protocol.read()
|
||||
|
||||
def _init_session(self, derive_cardano: bool = False):
|
||||
self._write(
|
||||
messages.Initialize(session_id=self.id, derive_cardano=derive_cardano)
|
||||
)
|
||||
_ = self._read()
|
||||
|
||||
|
||||
def _callback_button(session: Session, msg: t.Any) -> t.Any:
|
||||
print("Please confirm action on your Trezor device.") # TODO how to handle UI?
|
||||
|
Loading…
Reference in New Issue
Block a user