mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-23 22:01:01 +00:00
fix(trezorlib): fox ping command, add ping to session
[no changelog]
This commit is contained in:
parent
6cc879deea
commit
89d9c1f816
@ -337,9 +337,7 @@ def ping(session: "Session", message: str, button_protection: bool) -> str:
|
|||||||
"""Send ping message."""
|
"""Send ping message."""
|
||||||
|
|
||||||
# TODO return short-circuit from old client for old Trezors
|
# TODO return short-circuit from old client for old Trezors
|
||||||
return session.call(
|
return session.ping(message, button_protection)
|
||||||
messages.Ping(message=message, button_protection=button_protection)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
|
@ -73,6 +73,12 @@ class Session:
|
|||||||
def end(self) -> t.Any:
|
def end(self) -> t.Any:
|
||||||
return self.call(messages.EndSession())
|
return self.call(messages.EndSession())
|
||||||
|
|
||||||
|
def ping(self, message: str, button_protection: bool | None = None) -> str:
|
||||||
|
resp: messages.Success = self.call(
|
||||||
|
messages.Ping(message=message, button_protection=button_protection)
|
||||||
|
)
|
||||||
|
return resp.message or ""
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def features(self) -> messages.Features:
|
def features(self) -> messages.Features:
|
||||||
return self.client.features
|
return self.client.features
|
||||||
|
Loading…
Reference in New Issue
Block a user