diff --git a/core/embed/rust/src/ui/model_tt/layout.rs b/core/embed/rust/src/ui/model_tt/layout.rs index e71b83380b..a8c4809107 100644 --- a/core/embed/rust/src/ui/model_tt/layout.rs +++ b/core/embed/rust/src/ui/model_tt/layout.rs @@ -773,10 +773,6 @@ extern "C" fn new_confirm_summary(n_args: usize, args: *const Obj, kwargs: *mut .get(Qstr::MP_QSTR_title) .unwrap_or_else(|_| Obj::const_none()) .try_into_option()?; - let fee_items: Option = kwargs - .get(Qstr::MP_QSTR_fee_items) - .unwrap_or_else(|_| Obj::const_none()) - .try_into_option()?; let account_items: Option = kwargs .get(Qstr::MP_QSTR_account_items) .unwrap_or_else(|_| Obj::const_none()) @@ -785,13 +781,16 @@ extern "C" fn new_confirm_summary(n_args: usize, args: *const Obj, kwargs: *mut .get(Qstr::MP_QSTR_extra_items) .unwrap_or_else(|_| Obj::const_none()) .try_into_option()?; + let _extra_title: Option = kwargs + .get(Qstr::MP_QSTR_extra_title) + .unwrap_or_else(|_| Obj::const_none()) + .try_into_option()?; let verb_cancel: Option> = kwargs .get(Qstr::MP_QSTR_verb_cancel) .unwrap_or_else(|_| Obj::const_none()) .try_into_option()?; - let info_button: bool = - fee_items.is_some() || account_items.is_some() || extra_items.is_some(); + let info_button: bool = account_items.is_some() || extra_items.is_some(); let paragraphs = ParagraphVecShort::from_iter([ Paragraph::new(&theme::TEXT_NORMAL, amount_label).no_break(), Paragraph::new(&theme::TEXT_MONO, amount), @@ -1899,9 +1898,9 @@ pub static mp_module_trezorui2: Module = obj_module! { /// fee: str, /// fee_label: str, /// title: str | None = None, - /// fee_items: Iterable[tuple[str, str]] | None = None, /// account_items: Iterable[tuple[str, str]] | None = None, /// extra_items: Iterable[tuple[str, str]] | None = None, + /// extra_title: str | None = None, /// verb_cancel: str | None = None, /// ) -> LayoutObj[UiResult]: /// """Confirm summary of a transaction.""" diff --git a/core/mocks/generated/trezorui2.pyi b/core/mocks/generated/trezorui2.pyi index d83c908960..3e0988a5bc 100644 --- a/core/mocks/generated/trezorui2.pyi +++ b/core/mocks/generated/trezorui2.pyi @@ -1287,9 +1287,9 @@ def confirm_summary( fee: str, fee_label: str, title: str | None = None, - fee_items: Iterable[tuple[str, str]] | None = None, account_items: Iterable[tuple[str, str]] | None = None, extra_items: Iterable[tuple[str, str]] | None = None, + extra_title: str | None = None, verb_cancel: str | None = None, ) -> LayoutObj[UiResult]: """Confirm summary of a transaction.""" diff --git a/core/src/trezor/ui/layouts/tt/__init__.py b/core/src/trezor/ui/layouts/tt/__init__.py index 37cfb22034..76537b9220 100644 --- a/core/src/trezor/ui/layouts/tt/__init__.py +++ b/core/src/trezor/ui/layouts/tt/__init__.py @@ -727,14 +727,13 @@ def confirm_total( fee_label = fee_label or TR.send__including_fee # def_arg account_info_items = [] - fee_info_items = [] extra_info_items = [] if source_account: account_info_items.append( (TR.confirm_total__sending_from_account, source_account) ) if fee_rate_amount: - fee_info_items.append((f"{TR.confirm_total__fee_rate}:", fee_rate_amount)) + extra_info_items.append((f"{TR.confirm_total__fee_rate}:", fee_rate_amount)) return _confirm_summary( total_amount, @@ -742,9 +741,9 @@ def confirm_total( fee_amount, fee_label, title=title, - fee_items=fee_info_items, account_items=account_info_items, extra_items=extra_info_items, + extra_title=TR.words__title_information, br_name=br_name, br_code=br_code, ) @@ -756,7 +755,6 @@ def _confirm_summary( fee: str, fee_label: str, title: str | None = None, - fee_items: Iterable[tuple[str, str]] | None = None, account_items: Iterable[tuple[str, str]] | None = None, extra_items: Iterable[tuple[str, str]] | None = None, extra_title: str | None = None, @@ -771,15 +769,12 @@ def _confirm_summary( fee=fee, fee_label=fee_label, title=title, - fee_items=fee_items or None, account_items=account_items or None, extra_items=extra_items or None, ) # TODO: use `_info` params directly in this^ layout instead of using `with_info` info_items = [] - if fee_items: - info_items.extend(fee_items) if account_items: info_items.extend(account_items) if extra_items: