diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h index 25a9b233c8..84c9cb9649 100644 --- a/core/embed/rust/librust_qstr.h +++ b/core/embed/rust/librust_qstr.h @@ -226,7 +226,6 @@ static void _librust_qstrs(void) { MP_QSTR_decode; MP_QSTR_deinit; MP_QSTR_description; - MP_QSTR_description_font_green; MP_QSTR_details_title; MP_QSTR_device_name__change_template; MP_QSTR_device_name__title; diff --git a/core/embed/rust/src/ui/model_mercury/layout.rs b/core/embed/rust/src/ui/model_mercury/layout.rs index b5e3b37302..dc9ea273ed 100644 --- a/core/embed/rust/src/ui/model_mercury/layout.rs +++ b/core/embed/rust/src/ui/model_mercury/layout.rs @@ -374,10 +374,10 @@ extern "C" fn new_confirm_blob(n_args: usize, args: *const Obj, kwargs: *mut Map let block = move |_args: &[Obj], kwargs: &Map| { let title: TString = kwargs.get(Qstr::MP_QSTR_title)?.try_into()?; let data: Obj = kwargs.get(Qstr::MP_QSTR_data)?; - let description: Option = - kwargs.get(Qstr::MP_QSTR_description)?.try_into_option()?; - let description_font_green: bool = - kwargs.get_or(Qstr::MP_QSTR_description_font_green, false)?; + let description: Option = kwargs + .get(Qstr::MP_QSTR_description) + .unwrap_or_else(|_| Obj::const_none()) + .try_into_option()?; let text_mono: bool = kwargs.get_or(Qstr::MP_QSTR_text_mono, true)?; let extra: Option = kwargs .get(Qstr::MP_QSTR_extra) @@ -408,10 +408,13 @@ extern "C" fn new_confirm_blob(n_args: usize, args: *const Obj, kwargs: *mut Map .unwrap_or_else(|_| Obj::const_none()) .try_into_option()?; - let description_font = if description_font_green { - &theme::TEXT_SUB_GREEN_LIME + let (description, description_font) = if page_limit == Some(1) { + ( + Some(TR::instructions__view_all_data.into()), + &theme::TEXT_SUB_GREEN_LIME, + ) } else { - &theme::TEXT_NORMAL + (description, &theme::TEXT_NORMAL) }; ConfirmBlobParams::new( @@ -1248,7 +1251,6 @@ pub static mp_module_trezorui2: Module = obj_module! { /// title: str, /// data: str | bytes, /// description: str | None, - /// description_font_green: bool = False, /// text_mono: bool = True, /// extra: str | None = None, /// subtitle: str | None = None, diff --git a/core/embed/rust/src/ui/model_tr/layout.rs b/core/embed/rust/src/ui/model_tr/layout.rs index 5b8d06b6ef..248eb5b418 100644 --- a/core/embed/rust/src/ui/model_tr/layout.rs +++ b/core/embed/rust/src/ui/model_tr/layout.rs @@ -1700,7 +1700,6 @@ pub static mp_module_trezorui2: Module = obj_module! { /// title: str, /// data: str | bytes, /// description: str | None, - /// description_font_green: bool = False, /// text_mono: bool = True, /// extra: str | None = None, /// subtitle: str | None = None, diff --git a/core/embed/rust/src/ui/model_tt/layout.rs b/core/embed/rust/src/ui/model_tt/layout.rs index b3b2e403e9..f37952700f 100644 --- a/core/embed/rust/src/ui/model_tt/layout.rs +++ b/core/embed/rust/src/ui/model_tt/layout.rs @@ -1794,7 +1794,6 @@ pub static mp_module_trezorui2: Module = obj_module! { /// title: str, /// data: str | bytes, /// description: str | None, - /// description_font_green: bool = False, /// text_mono: bool = True, /// extra: str | None = None, /// subtitle: str | None = None, diff --git a/core/mocks/generated/trezorui2.pyi b/core/mocks/generated/trezorui2.pyi index 2f2d5a71a3..78d42c01c8 100644 --- a/core/mocks/generated/trezorui2.pyi +++ b/core/mocks/generated/trezorui2.pyi @@ -59,7 +59,6 @@ def confirm_blob( title: str, data: str | bytes, description: str | None, - description_font_green: bool = False, text_mono: bool = True, extra: str | None = None, subtitle: str | None = None, @@ -632,7 +631,6 @@ def confirm_blob( title: str, data: str | bytes, description: str | None, - description_font_green: bool = False, text_mono: bool = True, extra: str | None = None, subtitle: str | None = None, @@ -1204,7 +1202,6 @@ def confirm_blob( title: str, data: str | bytes, description: str | None, - description_font_green: bool = False, text_mono: bool = True, extra: str | None = None, subtitle: str | None = None, diff --git a/core/src/trezor/ui/layouts/mercury/__init__.py b/core/src/trezor/ui/layouts/mercury/__init__.py index f99c84b386..fadd60d10a 100644 --- a/core/src/trezor/ui/layouts/mercury/__init__.py +++ b/core/src/trezor/ui/layouts/mercury/__init__.py @@ -480,9 +480,8 @@ def confirm_blob( main_layout = trezorui2.confirm_blob( title=title, data=data, - description=TR.instructions__view_all_data, - description_font_green=True, - subtitle=subtitle, + description=None, + subtitle=description, verb=verb, verb_cancel=verb_cancel, verb_info=TR.buttons__view_all_data, @@ -540,7 +539,7 @@ if not utils.BITCOIN_ONLY: "confirm_data", TR.ethereum__title_input_data, data, - subtitle=TR.ethereum__data_size_template.format(data_total), + TR.ethereum__data_size_template.format(data_total), verb=TR.buttons__confirm, verb_cancel=TR.send__cancel_sign, br_code=ButtonRequestType.SignTx, diff --git a/core/src/trezor/ui/layouts/tr/__init__.py b/core/src/trezor/ui/layouts/tr/__init__.py index 8ca962ff20..9c497d94e0 100644 --- a/core/src/trezor/ui/layouts/tr/__init__.py +++ b/core/src/trezor/ui/layouts/tr/__init__.py @@ -638,7 +638,7 @@ if not utils.BITCOIN_ONLY: "confirm_data", TR.ethereum__title_input_data, data, - subtitle=TR.ethereum__data_size_template.format(data_total), + TR.ethereum__data_size_template.format(data_total), verb=TR.buttons__confirm, verb_cancel=None, br_code=ButtonRequestType.SignTx, diff --git a/core/src/trezor/ui/layouts/tt/__init__.py b/core/src/trezor/ui/layouts/tt/__init__.py index 3f5a5ef94c..850059babf 100644 --- a/core/src/trezor/ui/layouts/tt/__init__.py +++ b/core/src/trezor/ui/layouts/tt/__init__.py @@ -606,7 +606,7 @@ if not utils.BITCOIN_ONLY: "confirm_data", TR.ethereum__title_input_data, data, - subtitle=TR.ethereum__data_size_template.format(data_total), + TR.ethereum__data_size_template.format(data_total), verb=TR.buttons__confirm, verb_cancel=None, br_code=ButtonRequestType.SignTx,