Skip to content

Commit

Permalink
Return StatusWords::Unknown when receiving APDU while pin locked
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed May 22, 2024
1 parent 055a1db commit a0d709e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ extern "C" fn sample_main() {
io::Event::Ticker => {
// Pin lock management
if UxEvent::Event.request() != BOLOS_UX_OK {
UxEvent::block();
let (_res, ins) = UxEvent::block_and_get_event::<Ins>(&mut comm);
if let Some(_e) = ins {
comm.reply::<io::StatusWords>(io::StatusWords::Unknown);
}
// Redisplay screen
clear_screen();
menu.pagelinks[page_index].page.place();
Expand Down

0 comments on commit a0d709e

Please sign in to comment.