mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-26 06:12:01 +00:00
feat(core): skip empty fee entry in UICaesar::confirm_summary
Otherwise, we may get an additional empty confirmation screen. [no changelog]
This commit is contained in:
parent
d33244912b
commit
2284b338c8
@ -548,15 +548,19 @@ impl FirmwareUI for UICaesar {
|
|||||||
// Total amount + fee
|
// Total amount + fee
|
||||||
let (btn_layout, btn_actions) = btns_summary_page(!info_pages.is_empty());
|
let (btn_layout, btn_actions) = btns_summary_page(!info_pages.is_empty());
|
||||||
|
|
||||||
let ops = OpTextLayout::new(theme::TEXT_MONO)
|
let mut ops = OpTextLayout::new(theme::TEXT_MONO)
|
||||||
.text(amount_label, fonts::FONT_BOLD)
|
.text(amount_label, fonts::FONT_BOLD)
|
||||||
.newline()
|
.newline()
|
||||||
.text(amount, fonts::FONT_MONO)
|
.text(amount, fonts::FONT_MONO);
|
||||||
|
|
||||||
|
if !fee_label.is_empty() || !fee.is_empty() {
|
||||||
|
ops = ops
|
||||||
.newline()
|
.newline()
|
||||||
.newline()
|
.newline()
|
||||||
.text(fee_label, fonts::FONT_BOLD)
|
.text(fee_label, fonts::FONT_BOLD)
|
||||||
.newline()
|
.newline()
|
||||||
.text(fee, fonts::FONT_MONO);
|
.text(fee, fonts::FONT_MONO);
|
||||||
|
}
|
||||||
|
|
||||||
let formatted = FormattedText::new(ops);
|
let formatted = FormattedText::new(ops);
|
||||||
Page::new(btn_layout, btn_actions, formatted)
|
Page::new(btn_layout, btn_actions, formatted)
|
||||||
|
Loading…
Reference in New Issue
Block a user