mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-18 03:10:58 +00:00
fix(core): disallow canceling on uncancelable pages
This commit is contained in:
parent
d711fbcad5
commit
dd3bf253f8
1
core/.changelog.d/4500.fixed
Normal file
1
core/.changelog.d/4500.fixed
Normal file
@ -0,0 +1 @@
|
|||||||
|
[T3B1] Fix backup failing if middle button is pressed during confirmation.
|
@ -489,7 +489,11 @@ impl Component for ButtonController {
|
|||||||
} else {
|
} else {
|
||||||
(
|
(
|
||||||
ButtonState::OneReleased(b),
|
ButtonState::OneReleased(b),
|
||||||
Some(ButtonControllerMsg::Triggered(b.into(), false)),
|
match b {
|
||||||
|
PhysicalButton::Left => self.left_btn.maybe_trigger(ctx),
|
||||||
|
PhysicalButton::Right => self.right_btn.maybe_trigger(ctx),
|
||||||
|
_ => None,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,9 +179,11 @@ where
|
|||||||
// Clicked BACK. Scroll up.
|
// Clicked BACK. Scroll up.
|
||||||
self.go_to_previous_page();
|
self.go_to_previous_page();
|
||||||
self.change_page(ctx);
|
self.change_page(ctx);
|
||||||
} else {
|
} else if self.cancel_btn_details.is_some() {
|
||||||
// Clicked CANCEL. Send result.
|
// Clicked CANCEL. Send result.
|
||||||
return Some(PageMsg::Cancelled);
|
return Some(PageMsg::Cancelled);
|
||||||
|
} else {
|
||||||
|
return None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ButtonPos::Right => {
|
ButtonPos::Right => {
|
||||||
|
Loading…
Reference in New Issue
Block a user