From cee96cddf1d7362005d2f65d3bf96d7f22419b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Fri, 15 Nov 2024 12:18:35 +0100 Subject: [PATCH] chore(core): remove unused confirm_more on TS5 [no changelog] --- .../embed/rust/src/ui/model_mercury/layout.rs | 35 ------------------- core/mocks/generated/trezorui2.pyi | 11 ------ 2 files changed, 46 deletions(-) diff --git a/core/embed/rust/src/ui/model_mercury/layout.rs b/core/embed/rust/src/ui/model_mercury/layout.rs index 37e762752b..0a0ac3f222 100644 --- a/core/embed/rust/src/ui/model_mercury/layout.rs +++ b/core/embed/rust/src/ui/model_mercury/layout.rs @@ -978,31 +978,6 @@ extern "C" fn new_confirm_with_info(n_args: usize, args: *const Obj, kwargs: *mu unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) } } -extern "C" fn new_confirm_more(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 items: Obj = kwargs.get(Qstr::MP_QSTR_items)?; - - let mut paragraphs = ParagraphVecLong::new(); - - for para in IterBuf::new().try_iterate(items)? { - let [font, text]: [Obj; 2] = util::iter_into_array(para)?; - let style: &TextStyle = theme::textstyle_number(font.try_into()?); - let text: TString = text.try_into()?; - paragraphs.add(Paragraph::new(style, text)); - } - - let obj = LayoutObj::new(SwipeUpScreen::new( - Frame::left_aligned(title, SwipeContent::new(paragraphs.into_paragraphs())) - .with_cancel_button() - .with_footer(TR::instructions__swipe_up.into(), None) - .with_swipe(Direction::Up, SwipeSettings::default()), - ))?; - Ok(obj.into()) - }; - unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) } -} - extern "C" fn new_confirm_coinjoin(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj { let block = move |_args: &[Obj], kwargs: &Map| { let max_rounds: TString = kwargs.get(Qstr::MP_QSTR_max_rounds)?.try_into()?; @@ -1566,16 +1541,6 @@ pub static mp_module_trezorui2: Module = obj_module! { /// context menu.""" Qstr::MP_QSTR_confirm_with_info => obj_fn_kw!(0, new_confirm_with_info).as_obj(), - /// def confirm_more( - /// *, - /// title: str, - /// button: str, - /// items: Iterable[tuple[int, str]], - /// ) -> LayoutObj[UiResult]: - /// """Confirm long content with the possibility to go back from any page. - /// Meant to be used with confirm_with_info.""" - Qstr::MP_QSTR_confirm_more => obj_fn_kw!(0, new_confirm_more).as_obj(), - /// def confirm_coinjoin( /// *, /// max_rounds: str, diff --git a/core/mocks/generated/trezorui2.pyi b/core/mocks/generated/trezorui2.pyi index 03e6b5225b..9f333dfdbf 100644 --- a/core/mocks/generated/trezorui2.pyi +++ b/core/mocks/generated/trezorui2.pyi @@ -280,17 +280,6 @@ def confirm_with_info( context menu.""" -# rust/src/ui/model_mercury/layout.rs -def confirm_more( - *, - title: str, - button: str, - items: Iterable[tuple[int, str]], -) -> LayoutObj[UiResult]: - """Confirm long content with the possibility to go back from any page. - Meant to be used with confirm_with_info.""" - - # rust/src/ui/model_mercury/layout.rs def confirm_coinjoin( *,