|
|
|
@ -189,7 +189,6 @@ class RustLayout(ui.Layout):
|
|
|
|
|
|
|
|
|
|
touch = loop.wait(io.TOUCH)
|
|
|
|
|
self._first_paint()
|
|
|
|
|
# self.layout.bounds()
|
|
|
|
|
while True:
|
|
|
|
|
# Using `yield` instead of `await` to avoid allocations.
|
|
|
|
|
event, x, y = yield touch
|
|
|
|
@ -200,7 +199,6 @@ class RustLayout(ui.Layout):
|
|
|
|
|
if msg is not None:
|
|
|
|
|
raise ui.Result(msg)
|
|
|
|
|
self._paint()
|
|
|
|
|
# self.layout.bounds()
|
|
|
|
|
|
|
|
|
|
def handle_timers(self) -> loop.Task: # type: ignore [awaitable-is-generator]
|
|
|
|
|
while True:
|
|
|
|
@ -408,12 +406,12 @@ async def show_address(
|
|
|
|
|
xpubs: Sequence[str] = (),
|
|
|
|
|
) -> None:
|
|
|
|
|
send_button_request = True
|
|
|
|
|
title = (
|
|
|
|
|
"RECEIVE ADDRESS\n(MULTISIG)"
|
|
|
|
|
if multisig_index is not None
|
|
|
|
|
else "RECEIVE ADDRESS"
|
|
|
|
|
)
|
|
|
|
|
while True:
|
|
|
|
|
title = (
|
|
|
|
|
"RECEIVE ADDRESS\n(MULTISIG)"
|
|
|
|
|
if multisig_index is not None
|
|
|
|
|
else "RECEIVE ADDRESS"
|
|
|
|
|
)
|
|
|
|
|
layout = RustLayout(
|
|
|
|
|
trezorui2.confirm_address(
|
|
|
|
|
title=title,
|
|
|
|
@ -825,7 +823,7 @@ def confirm_value(
|
|
|
|
|
value: str,
|
|
|
|
|
description: str,
|
|
|
|
|
br_type: str,
|
|
|
|
|
br_code: ButtonRequestType = ButtonRequestType.Other,
|
|
|
|
|
br_code: ButtonRequestType = BR_TYPE_OTHER,
|
|
|
|
|
*,
|
|
|
|
|
verb: str | None = None,
|
|
|
|
|
subtitle: str | None = None,
|
|
|
|
@ -1052,7 +1050,7 @@ async def confirm_coinjoin(
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
"coinjoin_final",
|
|
|
|
|
ButtonRequestType.Other,
|
|
|
|
|
BR_TYPE_OTHER,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@ -1067,7 +1065,7 @@ async def confirm_sign_identity(
|
|
|
|
|
data=identity,
|
|
|
|
|
description=challenge_visual + "\n" if challenge_visual else "",
|
|
|
|
|
br_type="sign_identity",
|
|
|
|
|
br_code=ButtonRequestType.Other,
|
|
|
|
|
br_code=BR_TYPE_OTHER,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1087,7 +1085,7 @@ async def confirm_signverify(
|
|
|
|
|
title,
|
|
|
|
|
address,
|
|
|
|
|
"Confirm address:",
|
|
|
|
|
br_code=ButtonRequestType.Other,
|
|
|
|
|
br_code=BR_TYPE_OTHER,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
await confirm_blob(
|
|
|
|
@ -1096,7 +1094,7 @@ async def confirm_signverify(
|
|
|
|
|
title,
|
|
|
|
|
message,
|
|
|
|
|
"Confirm message:",
|
|
|
|
|
br_code=ButtonRequestType.Other,
|
|
|
|
|
br_code=BR_TYPE_OTHER,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1170,12 +1168,11 @@ async def request_pin_on_device(
|
|
|
|
|
wrong_pin=wrong_pin,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
while True:
|
|
|
|
|
result = await ctx.wait(dialog)
|
|
|
|
|
if result is CANCELLED:
|
|
|
|
|
raise PinCancelled
|
|
|
|
|
assert isinstance(result, str)
|
|
|
|
|
return result
|
|
|
|
|
result = await ctx.wait(dialog)
|
|
|
|
|
if result is CANCELLED:
|
|
|
|
|
raise PinCancelled
|
|
|
|
|
assert isinstance(result, str)
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RustProgress:
|
|
|
|
|