diff --git a/core/embed/rust/src/ui/model_mercury/flow/confirm_output_contact.rs b/core/embed/rust/src/ui/model_mercury/flow/confirm_output_contact.rs index cb4ed99548..406bb35b15 100644 --- a/core/embed/rust/src/ui/model_mercury/flow/confirm_output_contact.rs +++ b/core/embed/rust/src/ui/model_mercury/flow/confirm_output_contact.rs @@ -68,8 +68,9 @@ impl FlowController for ConfirmOutputContact { } } pub fn new_confirm_output_contact( - paragraphs: ParagraphVecShort<'static>, title: TString<'static>, + subtitle: TString<'static>, + paragraphs: ParagraphVecShort<'static>, address_params: ShowInfoParams, amount_params: ConfirmBlobParams, ) -> Result { @@ -81,6 +82,7 @@ pub fn new_confirm_output_contact( let content_contact = Frame::left_aligned(title, SwipeContent::new(paragraphs)) .with_swipe(Direction::Up, SwipeSettings::default()) .with_swipe(Direction::Left, SwipeSettings::default()) + .with_subtitle(subtitle) .with_menu_button() .with_footer(TR::instructions__swipe_up.into(), None) .map(move |msg| match msg { diff --git a/core/embed/rust/src/ui/model_mercury/layout.rs b/core/embed/rust/src/ui/model_mercury/layout.rs index 8a1d71aea7..aa4c68d85d 100644 --- a/core/embed/rust/src/ui/model_mercury/layout.rs +++ b/core/embed/rust/src/ui/model_mercury/layout.rs @@ -625,17 +625,17 @@ extern "C" fn new_confirm_output(n_args: usize, args: *const Obj, kwargs: *mut M extern "C" fn new_confirm_output_contact(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj { let block = move |_args: &[Obj], kwargs: &Map| { let title: TString = kwargs.get(Qstr::MP_QSTR_title)?.try_into()?; + let subtitle: TString = kwargs.get(Qstr::MP_QSTR_subtitle)?.try_into()?; let contact_label: TString = kwargs.get(Qstr::MP_QSTR_contact_label)?.try_into()?; let address: TString = kwargs.get(Qstr::MP_QSTR_address)?.try_into()?; let amount: Obj = kwargs.get(Qstr::MP_QSTR_amount)?; let chunkify: bool = kwargs.get_or(Qstr::MP_QSTR_chunkify, true)?; - let paragraphs = ParagraphVecShort::from_iter([ - Paragraph::new(&theme::TEXT_SUB_GREY, "Contact"), - Paragraph::new(&theme::TEXT_SUPER, contact_label), - ]); + let paragraphs = + ParagraphVecShort::from_iter([Paragraph::new(&theme::TEXT_SUPER, contact_label)]); let amount_params = ConfirmBlobParams::new(TR::words__amount.into(), amount, None) + .with_subtitle(Some(subtitle)) .with_menu_button() .with_footer(TR::instructions__swipe_up.into(), None) .with_text_mono(true) @@ -643,13 +643,15 @@ extern "C" fn new_confirm_output_contact(n_args: usize, args: *const Obj, kwargs .with_swipe_down(); let mut address_params = ShowInfoParams::new(TR::words__address.into()) + .with_subtitle(Some(subtitle)) .with_cancel_button() .with_chunkify(chunkify); - address_params = unwrap!(address_params.add(TR::words__address.into(), address)); + address_params = unwrap!(address_params.add(TString::empty(), address)); let flow = flow::new_confirm_output_contact( - paragraphs, title, + subtitle, + paragraphs, address_params, amount_params, )?; @@ -2023,6 +2025,7 @@ pub static mp_module_trezorui2: Module = obj_module! { /// def flow_confirm_output_contact( /// *, /// title: str, + /// subtitle: str, /// contact_label: str, /// address: str, /// amount: str, diff --git a/core/src/trezor/ui/layouts/mercury/__init__.py b/core/src/trezor/ui/layouts/mercury/__init__.py index b6e6bc1ed0..6d21d4c9da 100644 --- a/core/src/trezor/ui/layouts/mercury/__init__.py +++ b/core/src/trezor/ui/layouts/mercury/__init__.py @@ -389,7 +389,8 @@ async def confirm_output( if contact_label: await raise_if_not_confirmed( trezorui2.flow_confirm_output_contact( - title = "Send", + title="Contact", + subtitle=title, contact_label=contact_label, address=address, amount=amount,