Skip to content

Commit 13ede06

Browse files
authored
Merge pull request #253 from LedgerHQ/y333/fix_ux_event_id
Panic if unknown UX event is set
2 parents c1a43f4 + b44e965 commit 13ede06

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ledger_device_sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_device_sdk"
3-
version = "1.22.0"
3+
version = "1.22.1"
44
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
55
edition = "2021"
66
license.workspace = true

ledger_device_sdk/src/uxapp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub enum UxEvent {
2121
Keyboard = BOLOS_UX_KEYBOARD,
2222
WakeUp = BOLOS_UX_WAKE_UP,
2323
ValidatePIN = BOLOS_UX_VALIDATE_PIN,
24-
LastID = BOLOS_UX_LAST_ID,
24+
LastID = BOLOS_UX_VALIDATE_PIN + 1,
2525
}
2626

2727
impl UxEvent {
@@ -38,7 +38,7 @@ impl UxEvent {
3838

3939
Self::ValidatePIN as u8
4040
}
41-
Self::LastID => Self::LastID as u8,
41+
Self::LastID => panic!("Unknown UX Event"),
4242
};
4343

4444
os_ux_rs(&params);

0 commit comments

Comments
 (0)