From b7f86ec15841a24d56943837bf34de57568ac650 Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Mon, 24 Oct 2022 19:05:29 +0200 Subject: [PATCH] feat(core): Improve CoinJoin busy screen. [no changelog] --- core/src/apps/homescreen/busyscreen.py | 6 ++---- core/src/trezor/ui/layouts/tt/__init__.py | 9 +++++++++ core/src/trezor/ui/layouts/tt_v2/__init__.py | 4 ++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/core/src/apps/homescreen/busyscreen.py b/core/src/apps/homescreen/busyscreen.py index fffde579f..bd27a7f84 100644 --- a/core/src/apps/homescreen/busyscreen.py +++ b/core/src/apps/homescreen/busyscreen.py @@ -1,6 +1,6 @@ import storage.cache from trezor import loop, ui -from trezor.ui.layouts import draw_simple_text +from trezor.ui.layouts import show_coinjoin from apps.base import busy_expiry_ms, set_homescreen @@ -24,6 +24,4 @@ class Busyscreen(HomescreenBase): raise ui.Result(None) def do_render(self) -> None: - draw_simple_text( - "Please wait", "CoinJoin in progress.\n\nDo not disconnect your\nTrezor." - ) + show_coinjoin() diff --git a/core/src/trezor/ui/layouts/tt/__init__.py b/core/src/trezor/ui/layouts/tt/__init__.py index 2df9a80eb..1c075b87e 100644 --- a/core/src/trezor/ui/layouts/tt/__init__.py +++ b/core/src/trezor/ui/layouts/tt/__init__.py @@ -71,6 +71,7 @@ __all__ = ( "confirm_modify_output", "confirm_modify_fee", "confirm_coinjoin", + "show_coinjoin", "show_popup", "draw_simple_text", "request_passphrase_on_device", @@ -1021,6 +1022,14 @@ async def confirm_coinjoin( ) +def show_coinjoin() -> None: + text = Text("Please wait", ui.ICON_CONFIG, ui.RED) + text.normal("CoinJoin in progress.") + text.br() + text.bold("Do not disconnect your Trezor.") + ui.draw_simple(text) + + # TODO cleanup @ redesign async def confirm_sign_identity( ctx: wire.GenericContext, proto: str, identity: str, challenge_visual: str | None diff --git a/core/src/trezor/ui/layouts/tt_v2/__init__.py b/core/src/trezor/ui/layouts/tt_v2/__init__.py index cea03da81..476ff76c8 100644 --- a/core/src/trezor/ui/layouts/tt_v2/__init__.py +++ b/core/src/trezor/ui/layouts/tt_v2/__init__.py @@ -935,6 +935,10 @@ async def confirm_coinjoin( ) +def show_coinjoin() -> None: + log.error(__name__, "show_coinjoin not implemented") + + # TODO cleanup @ redesign async def confirm_sign_identity( ctx: wire.GenericContext, proto: str, identity: str, challenge_visual: str | None