From dbd5b622726a60bbb36cd51ffa296f4910c968be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Fri, 15 Nov 2024 12:17:43 +0100 Subject: [PATCH] feat(core/ui): continue after viewing all data --- core/.changelog.d/4302.added.3 | 1 + core/src/trezor/ui/layouts/tr/__init__.py | 10 ++++++---- tests/input_flows_helpers.py | 5 ----- 3 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 core/.changelog.d/4302.added.3 diff --git a/core/.changelog.d/4302.added.3 b/core/.changelog.d/4302.added.3 new file mode 100644 index 0000000000..9de959f438 --- /dev/null +++ b/core/.changelog.d/4302.added.3 @@ -0,0 +1 @@ +[T3B1] Add "continue" button after scrolling through the whole blob. diff --git a/core/src/trezor/ui/layouts/tr/__init__.py b/core/src/trezor/ui/layouts/tr/__init__.py index 2b44131818..66f0976cb1 100644 --- a/core/src/trezor/ui/layouts/tr/__init__.py +++ b/core/src/trezor/ui/layouts/tr/__init__.py @@ -600,7 +600,7 @@ async def _confirm_ask_pagination( confirm_more_layout = trezorui2.confirm_more( title=title, - button="GO BACK", + button=TR.buttons__confirm, items=[(ui.BOLD_UPPER, f"Size: {len(data)} bytes"), (ui.MONO, data)], ) @@ -614,9 +614,11 @@ async def _confirm_ask_pagination( ): return - await interact(confirm_more_layout, br_name, br_code, raise_on_cancel=None) - - assert False + result = await interact(confirm_more_layout, br_name, br_code, None) + if result is trezorui2.CANCELLED: + continue + else: + break def confirm_address( diff --git a/tests/input_flows_helpers.py b/tests/input_flows_helpers.py index 77abfb374c..404fa440de 100644 --- a/tests/input_flows_helpers.py +++ b/tests/input_flows_helpers.py @@ -371,11 +371,6 @@ class EthereumFlow: go_next(self.debug) self.debug.read_layout() - if self.debug.layout_type is LayoutType.TR: - # TR is going back to the "show more" screen here - assert (yield).name == "confirm_data" - self.debug.press_yes() - def paginate_data_go_back(self) -> BRGeneratorType: br = yield assert br.name == "confirm_data"