mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-07 14:00: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 = SessionV1(client, session_id)
|
||||||
session.button_callback = client.button_callback
|
session.button_callback = client.button_callback
|
||||||
session.pin_callback = client.pin_callback
|
session.pin_callback = client.pin_callback
|
||||||
|
session._init_session(derive_cardano=derive_cardano)
|
||||||
return session
|
return session
|
||||||
|
|
||||||
def _write(self, msg: t.Any) -> None:
|
def _write(self, msg: t.Any) -> None:
|
||||||
@ -109,6 +110,12 @@ class SessionV1(Session):
|
|||||||
assert isinstance(self.client.protocol, ProtocolV1)
|
assert isinstance(self.client.protocol, ProtocolV1)
|
||||||
return self.client.protocol.read()
|
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:
|
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?
|
||||||
|
Loading…
Reference in New Issue
Block a user