chore(core): hide empty "info" button on Caesar confirm_with_info()

[no changelog]
This commit is contained in:
Roman Zeyde
2026-02-13 13:20:47 +01:00
committed by Roman Zeyde
parent f939782a95
commit 00b74ad088
2 changed files with 11 additions and 3 deletions

View File

@@ -586,7 +586,11 @@ impl ButtonLayout {
Self::new(
Some(ButtonDetails::from_text_possible_icon(left)),
Some(ButtonDetails::armed_text(middle)),
Some(ButtonDetails::from_text_possible_icon(right)),
if right.is_empty() {
None
} else {
Some(ButtonDetails::from_text_possible_icon(right))
},
)
}
@@ -604,7 +608,11 @@ impl ButtonLayout {
Self::new(
Some(ButtonDetails::cancel_icon()),
Some(ButtonDetails::armed_text(middle)),
Some(ButtonDetails::from_text_possible_icon(right)),
if right.is_empty() {
None
} else {
Some(ButtonDetails::from_text_possible_icon(right))
},
)
}

View File

@@ -722,7 +722,7 @@ async def should_show_more(
Raises ActionCancelled if the user cancels.
"""
if button_text != DOWN_ARROW:
if button_text not in (DOWN_ARROW, ""):
button_text = INFO_ICON
result = await interact(
trezorui_api.confirm_with_info(