1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-10 01:58:45 +00:00

fix(solana): modify Trezor R confirm_value to align messages with Trezor T

This commit is contained in:
gabrielkerekes 2023-12-05 14:05:29 +01:00 committed by matejcik
parent 37119ce4a5
commit 63e35e13ed

View File

@ -966,29 +966,47 @@ async def confirm_value(
if len(info_items_list) > 1: if len(info_items_list) > 1:
raise NotImplementedError("Only one info item is supported") raise NotImplementedError("Only one info item is supported")
send_button_request = True
while True: while True:
should_show_info = await should_show_more( should_show_more_layout = RustLayout(
title, trezorui2.confirm_with_info(
para=((ui.NORMAL, value),), title=title.upper(),
button_text="INFO", items=((ui.NORMAL, value),),
br_type=br_type, button="CONFIRM",
br_code=br_code, info_button="INFO",
)
) )
if not should_show_info: if send_button_request:
return send_button_request = False
await button_request(
try: br_type,
info_title, info_value = info_items_list[0] br_code,
await confirm_action( should_show_more_layout.page_count(),
br_type="confirm_value_info",
title=info_title,
action=info_value,
verb="BACK",
verb_cancel="<",
) )
except ActionCancelled:
continue result = await ctx_wait(should_show_more_layout)
if result is CONFIRMED:
break
elif result is INFO:
info_title, info_value = info_items_list[0]
await ctx_wait(
RustLayout(
trezorui2.confirm_action(
title=info_title.upper(),
action=info_value,
description=description,
verb="BACK",
verb_cancel="<",
hold=False,
reverse=False,
)
)
)
else:
assert result is CANCELLED
raise ActionCancelled
async def confirm_total( async def confirm_total(