mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
fix(core): fix cancel behavior in SignMessage
This commit is contained in:
parent
73c8149528
commit
0a6c5504ef
@ -1048,23 +1048,24 @@ async def confirm_signverify(
|
|||||||
)
|
)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
result = await with_info(
|
try:
|
||||||
address_layout, info_layout, br_name, br_code=BR_CODE_OTHER
|
await with_info(address_layout, info_layout, br_name, br_code=BR_CODE_OTHER)
|
||||||
)
|
except ActionCancelled:
|
||||||
if result is not CONFIRMED:
|
|
||||||
result = await interact(
|
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)
|
assert result in (CONFIRMED, CANCELLED)
|
||||||
# Right button aborts action, left goes back to showing address.
|
# Right button aborts action, left goes back to showing address.
|
||||||
if result is CONFIRMED:
|
if result is CONFIRMED:
|
||||||
raise ActionCancelled
|
raise
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
result = await interact(message_layout, br_name, BR_CODE_OTHER)
|
|
||||||
if result is CONFIRMED:
|
|
||||||
break
|
break
|
||||||
|
|
||||||
|
await interact(message_layout, br_name, BR_CODE_OTHER)
|
||||||
|
|
||||||
|
|
||||||
def error_popup(
|
def error_popup(
|
||||||
title: str,
|
title: str,
|
||||||
|
Loading…
Reference in New Issue
Block a user