diff --git a/core/embed/rust/src/ui/model_tr/layout.rs b/core/embed/rust/src/ui/model_tr/layout.rs index 363d2f3852..f730f81550 100644 --- a/core/embed/rust/src/ui/model_tr/layout.rs +++ b/core/embed/rust/src/ui/model_tr/layout.rs @@ -543,7 +543,7 @@ extern "C" fn new_confirm_modify_output(n_args: usize, args: *const Obj, kwargs: Paragraph::new(&theme::TEXT_BOLD, "Address:".into()), Paragraph::new(&theme::TEXT_MONO, address).break_after(), Paragraph::new(&theme::TEXT_NORMAL, description.into()), - Paragraph::new(&theme::TEXT_MONO, amount_change), + Paragraph::new(&theme::TEXT_MONO, amount_change).break_after(), Paragraph::new(&theme::TEXT_BOLD, "New amount:".into()), Paragraph::new(&theme::TEXT_MONO, amount_new), ]); diff --git a/core/src/apps/management/apply_settings.py b/core/src/apps/management/apply_settings.py index abb3c466f1..60f36e04aa 100644 --- a/core/src/apps/management/apply_settings.py +++ b/core/src/apps/management/apply_settings.py @@ -230,7 +230,7 @@ async def _require_confirm_change_autolock_delay(delay_ms: int) -> None: await confirm_action( "set_autolock_delay", "Auto-lock delay", - description="Do you really want to auto-lock your device after {}?", + description="Auto-lock your Trezor after {} of inactivity?", description_param=format_duration_ms(delay_ms), br_code=BRT_PROTECT_CALL, ) diff --git a/core/src/trezor/ui/layouts/tr/__init__.py b/core/src/trezor/ui/layouts/tr/__init__.py index 450c58dc1f..c05263a5dc 100644 --- a/core/src/trezor/ui/layouts/tr/__init__.py +++ b/core/src/trezor/ui/layouts/tr/__init__.py @@ -401,7 +401,6 @@ async def confirm_reset_device( if recovery: await confirm_action( - ctx, "recover_device", title, description="It is safe to eject your Trezor anytime and continue later.", @@ -879,6 +878,9 @@ def confirm_value( if not verb and not hold: raise ValueError("Either verb or hold=True must be set") + if verb: + verb = verb.upper() + return raise_if_not_confirmed( interact( RustLayout( @@ -901,7 +903,7 @@ async def confirm_total( fee_amount: str, fee_rate_amount: str | None = None, title: str = "SENDING", - total_label: str = "TOTAL AMOUNT", + total_label: str = "Total amount:", fee_label: str = "Including fee:", account_label: str | None = None, br_type: str = "confirm_total", @@ -916,7 +918,7 @@ async def confirm_total( fee_amount=fee_amount, # type: ignore [No parameter named] fee_rate_amount=fee_rate_amount, # type: ignore [No parameter named] account_label=account_label, # type: ignore [No parameter named] - total_label=total_label.upper(), # type: ignore [No parameter named] + total_label=total_label, # type: ignore [No parameter named] fee_label=fee_label, # type: ignore [No parameter named] ) ), diff --git a/core/src/trezor/ui/layouts/tr/reset.py b/core/src/trezor/ui/layouts/tr/reset.py index 7f8fa14cd5..973e8982dd 100644 --- a/core/src/trezor/ui/layouts/tr/reset.py +++ b/core/src/trezor/ui/layouts/tr/reset.py @@ -268,7 +268,6 @@ async def show_success_backup() -> None: async def show_reset_warning( - ctx: GenericContext, br_type: str, content: str, subheader: str | None = None, @@ -276,7 +275,6 @@ async def show_reset_warning( br_code: ButtonRequestType = ButtonRequestType.Warning, ) -> None: await show_warning( - ctx, br_type, button.upper(), subheader or "", diff --git a/tests/click_tests/recovery.py b/tests/click_tests/recovery.py index b3a315f8b8..8d7ac5644e 100644 --- a/tests/click_tests/recovery.py +++ b/tests/click_tests/recovery.py @@ -143,12 +143,10 @@ def enter_share( def enter_shares(debug: "DebugLink", shares: list[str]) -> None: layout = debug.read_layout() expected_text = "Enter any share" - remaining = len(shares) for index, share in enumerate(shares): assert expected_text in layout.text_content() layout = enter_share(debug, share, is_first=index == 0) - remaining -= 1 - expected_text = f"{remaining} more share" + expected_text = f"{index + 1} of {len(shares)} shares entered" assert "Wallet recovered successfully" in layout.text_content() diff --git a/tests/click_tests/test_autolock.py b/tests/click_tests/test_autolock.py index a6f5d2a75b..9ad12acb6f 100644 --- a/tests/click_tests/test_autolock.py +++ b/tests/click_tests/test_autolock.py @@ -63,7 +63,7 @@ def set_autolock_delay(device_handler: "BackgroundDeviceHandler", delay_ms: int) debug.input("1234") assert ( - f"auto-lock your device after {delay_ms // 1000} seconds" + f"Auto-lock your Trezor after {delay_ms // 1000} seconds" in debug.wait_layout().text_content() ) layout = go_next(debug, wait=True) @@ -106,7 +106,7 @@ def test_autolock_interrupts_signing(device_handler: "BackgroundDeviceHandler"): elif debug.model == "R": debug.press_right(wait=True) layout = debug.press_right(wait=True) - assert "TOTAL AMOUNT 0.0039 BTC" in layout.text_content() + assert "Total amount: 0.0039 BTC" in layout.text_content() # wait for autolock to kick in time.sleep(10.1) @@ -151,7 +151,7 @@ def test_autolock_does_not_interrupt_signing(device_handler: "BackgroundDeviceHa elif debug.model == "R": debug.press_right(wait=True) layout = debug.press_right(wait=True) - assert "TOTAL AMOUNT 0.0039 BTC" in layout.text_content() + assert "Total amount: 0.0039 BTC" in layout.text_content() def sleepy_filter(msg: MessageType) -> MessageType: time.sleep(10.1) @@ -301,7 +301,7 @@ def test_dryrun_locks_at_word_entry(device_handler: "BackgroundDeviceHandler"): assert layout.main_component() == "MnemonicKeyboard" elif debug.model == "R": layout = debug.press_right(wait=True) - assert "RECOVER WALLET" in layout.title() + assert layout.title() in ("RECOVER WALLET", "BACKUP CHECK") debug.press_right() layout = debug.press_right(wait=True) assert "Slip39Entry" in layout.all_components() @@ -338,7 +338,7 @@ def test_dryrun_enter_word_slowly(device_handler: "BackgroundDeviceHandler"): assert layout.main_component() == "MnemonicKeyboard" elif debug.model == "R": layout = debug.press_right(wait=True) - assert "RECOVER WALLET" in layout.title() + assert layout.title() in ("RECOVER WALLET", "BACKUP CHECK") debug.press_right() layout = debug.press_right(wait=True) assert "Slip39Entry" in layout.all_components() diff --git a/tests/input_flows.py b/tests/input_flows.py index fc57683ccb..af7309508b 100644 --- a/tests/input_flows.py +++ b/tests/input_flows.py @@ -1419,7 +1419,7 @@ def bip39_recovery_possible_pin_tr( debug.input("654") yield - assert "re-enter to confirm" in debug.wait_layout().text_content() + assert "re-enter PIN to confirm" in debug.wait_layout().text_content() debug.press_right() yield @@ -1792,8 +1792,8 @@ class InputFlowResetSkipBackup(InputFlowBase): self.debug.press_right() self.debug.press_yes() yield # Skip Backup - self.debug.press_no() - yield # Confirm skip backup if self.debug.model == "R": self.debug.press_right() self.debug.press_no() + yield # Confirm skip backup + self.debug.press_no() diff --git a/tests/persistence_tests/test_shamir_persistence.py b/tests/persistence_tests/test_shamir_persistence.py index 9290445b79..98486559d8 100644 --- a/tests/persistence_tests/test_shamir_persistence.py +++ b/tests/persistence_tests/test_shamir_persistence.py @@ -146,7 +146,7 @@ def test_recovery_on_old_wallet(core_emulator: Emulator): layout = debug.wait_layout() # check that we entered the first share successfully - assert "2 more shares" in layout.text_content() + assert "1 of 3 shares entered" in layout.text_content() # try entering the remaining shares for share in MNEMONIC_SLIP39_BASIC_20_3of6[1:3]: