diff --git a/core/.changelog.d/4167.fixed b/core/.changelog.d/4167.fixed new file mode 100644 index 000000000..cfa8a80b6 --- /dev/null +++ b/core/.changelog.d/4167.fixed @@ -0,0 +1 @@ +[T3T1] Fix swipe in ETH stake flow menu and address confirmation. diff --git a/core/embed/rust/src/ui/model_mercury/flow/confirm_output.rs b/core/embed/rust/src/ui/model_mercury/flow/confirm_output.rs index 645562428..6c215eafd 100644 --- a/core/embed/rust/src/ui/model_mercury/flow/confirm_output.rs +++ b/core/embed/rust/src/ui/model_mercury/flow/confirm_output.rs @@ -142,14 +142,17 @@ impl FlowState for ConfirmOutputWithSummary { match (self, direction) { (Self::Main, SwipeDirection::Left) => Self::MainMenu.swipe(direction), (Self::Main, SwipeDirection::Up) => Self::Summary.swipe(direction), + (Self::MainMenu, SwipeDirection::Right) => Self::Main.swipe(direction), (Self::AddressInfo, SwipeDirection::Right) => Self::MainMenu.swipe(direction), (Self::AccountInfo, SwipeDirection::Right) => Self::MainMenu.swipe(direction), (Self::Summary, SwipeDirection::Left) => Self::SummaryMenu.swipe(direction), (Self::Summary, SwipeDirection::Up) => Self::Hold.swipe(direction), (Self::Summary, SwipeDirection::Down) => Self::Main.swipe(direction), + (Self::SummaryMenu, SwipeDirection::Right) => Self::Summary.swipe(direction), (Self::FeeInfo, SwipeDirection::Right) => Self::SummaryMenu.swipe(direction), (Self::Hold, SwipeDirection::Left) => Self::HoldMenu.swipe(direction), (Self::Hold, SwipeDirection::Down) => Self::Summary.swipe(direction), + (Self::HoldMenu, SwipeDirection::Right) => Self::Hold.swipe(direction), _ => self.do_nothing(), } } @@ -260,6 +263,7 @@ fn new_confirm_output_obj(_args: &[Obj], kwargs: &Map) -> Result Result Result Self { + self.swipe_up = true; + self + } + pub const fn with_swipe_down(mut self) -> Self { self.swipe_down = true; self } + pub const fn with_swipe_right(mut self) -> Self { + self.swipe_right = true; + self + } + pub const fn with_footer( mut self, instruction: TString<'static>, @@ -143,11 +157,18 @@ impl ConfirmBlobParams { frame = frame.with_swipe(SwipeDirection::Left, SwipeSettings::default()); } + if self.swipe_up { + frame = frame.with_swipe(SwipeDirection::Up, SwipeSettings::default()); + } + if self.swipe_down { frame = frame.with_swipe(SwipeDirection::Down, SwipeSettings::default()); } - frame = frame.with_swipe(SwipeDirection::Up, SwipeSettings::default()); + if self.swipe_right { + frame = frame.with_swipe(SwipeDirection::Right, SwipeSettings::default()); + } + frame = frame.with_vertical_pages(); Ok(frame.map(|msg| matches!(msg, FrameMsg::Button(_)).then_some(FlowMsg::Info)))