Skip to content

Commit

Permalink
chore(core): remove unused confirm_more on TS5
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
ibz committed Nov 15, 2024
1 parent e4c9904 commit b936428
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
35 changes: 0 additions & 35 deletions core/embed/rust/src/ui/model_mercury/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;
Expand Down Expand Up @@ -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,
Expand Down
11 changes: 0 additions & 11 deletions core/mocks/generated/trezorui2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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(
*,
Expand Down

0 comments on commit b936428

Please sign in to comment.