Skip to content

Commit

Permalink
feat: use correct status word when device is locked
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Oct 8, 2024
1 parent e680430 commit 2c5cdcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ledger_device_sdk/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub enum StatusWords {
UserCancelled = 0x6e04,
Unknown = 0x6d00,
Panic = 0xe000,
DeviceLocked = 0x5515,
}

#[derive(Debug)]
Expand Down
3 changes: 2 additions & 1 deletion ledger_device_sdk/src/ui/gadgets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,8 @@ impl<'a> MultiPageMenu<'a> {
// pin lock management
let (_res, ins) = UxEvent::block_and_get_event::<Temp>(self.comm);
if let Some(_e) = ins {
self.comm.reply::<io::StatusWords>(io::StatusWords::Unknown);
self.comm
.reply::<io::StatusWords>(io::StatusWords::DeviceLocked);
}
// notify Ticker event only when redisplay is required
return EventOrPageIndex::Event(io::Event::Ticker);
Expand Down

0 comments on commit 2c5cdcb

Please sign in to comment.