1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-07 14:00:57 +00:00

fix(core): fix cancel behavior in SignMessage

This commit is contained in:
matejcik 2024-09-20 12:03:37 +02:00 committed by M1nd3r
parent 6d48bbd2aa
commit eb8045ffb8

View File

@ -997,23 +997,24 @@ async def confirm_signverify(
)
while True:
result = await with_info(
address_layout, info_layout, br_name, br_code=BR_CODE_OTHER
)
if result is not CONFIRMED:
try:
await with_info(address_layout, info_layout, br_name, br_code=BR_CODE_OTHER)
except ActionCancelled:
result = await interact(
trezorui2.show_mismatch(title=TR.addr_mismatch__mismatch), None
trezorui2.show_mismatch(title=TR.addr_mismatch__mismatch),
None,
raise_on_cancel=None,
)
assert result in (CONFIRMED, CANCELLED)
# Right button aborts action, left goes back to showing address.
if result is CONFIRMED:
raise ActionCancelled
raise
continue
result = await interact(message_layout, br_name, BR_CODE_OTHER)
if result is CONFIRMED:
else:
break
await interact(message_layout, br_name, BR_CODE_OTHER)
def error_popup(
title: str,