1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-30 11:28:21 +00:00

fix(core/mercury): info at bitcoin fee bump

This commit is contained in:
obrusvit 2024-11-14 13:26:48 +01:00 committed by Vít Obrusník
parent 00f947d35a
commit 88ca9ae988
3 changed files with 14 additions and 14 deletions

View File

@ -0,0 +1 @@
[T3T1] Fixed information screen when signing BTC fee bump transaction

View File

@ -52,13 +52,13 @@ impl FlowController for ConfirmWithInfo {
pub fn new_confirm_with_info( pub fn new_confirm_with_info(
title: TString<'static>, title: TString<'static>,
button: TString<'static>, footer_description: Option<TString<'static>>,
info_button: TString<'static>, info_button: TString<'static>,
paragraphs: ParagraphVecShort<'static>, paragraphs: ParagraphVecShort<'static>,
) -> Result<SwipeFlow, error::Error> { ) -> Result<SwipeFlow, error::Error> {
let content_main = Frame::left_aligned(title, SwipeContent::new(paragraphs.into_paragraphs())) let content_main = Frame::left_aligned(title, SwipeContent::new(paragraphs.into_paragraphs()))
.with_menu_button() .with_menu_button()
.with_footer(TR::instructions__swipe_up.into(), Some(button)) .with_footer(TR::instructions__swipe_up.into(), footer_description)
.with_swipe(Direction::Up, SwipeSettings::default()) .with_swipe(Direction::Up, SwipeSettings::default())
.map(|msg| matches!(msg, FrameMsg::Button(FlowMsg::Info)).then_some(FlowMsg::Info)); .map(|msg| matches!(msg, FrameMsg::Button(FlowMsg::Info)).then_some(FlowMsg::Info));

View File

@ -836,20 +836,19 @@ extern "C" fn new_confirm_modify_fee(n_args: usize, args: *const Obj, kwargs: *m
}; };
let paragraphs = ParagraphVecShort::from_iter([ let paragraphs = ParagraphVecShort::from_iter([
Paragraph::new(&theme::TEXT_NORMAL, description), Paragraph::new(&theme::TEXT_SUB_GREY, description),
Paragraph::new(&theme::TEXT_MONO, change), Paragraph::new(&theme::TEXT_MONO, change),
Paragraph::new(&theme::TEXT_NORMAL, total_label), Paragraph::new(&theme::TEXT_SUB_GREY, total_label),
Paragraph::new(&theme::TEXT_MONO, total_fee_new), Paragraph::new(&theme::TEXT_MONO, total_fee_new),
]) ]);
.into_paragraphs();
let obj = LayoutObj::new(SwipeUpScreen::new( let flow = flow::new_confirm_with_info(
Frame::left_aligned(title, paragraphs) title,
.with_menu_button() None,
.with_footer(TR::instructions__swipe_up.into(), None) TR::words__title_information.into(),
.with_swipe(Direction::Up, SwipeSettings::default()), paragraphs,
))?; )?;
Ok(obj.into()) Ok(LayoutObj::new_root(flow)?.into())
}; };
unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) } unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) }
} }
@ -1038,7 +1037,7 @@ extern "C" fn new_confirm_with_info(n_args: usize, args: *const Obj, kwargs: *mu
} }
let flow = let flow =
confirm_with_info::new_confirm_with_info(title, button, info_button, paragraphs)?; confirm_with_info::new_confirm_with_info(title, Some(button), info_button, paragraphs)?;
Ok(LayoutObj::new_root(flow)?.into()) Ok(LayoutObj::new_root(flow)?.into())
}; };
unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) } unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) }