From 18481b5243756eebc8b553e1187f7ee0ad81f61b Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Mon, 7 Oct 2024 14:35:52 -0300 Subject: [PATCH] feat: use correct status word when device is locked --- ledger_device_sdk/src/io.rs | 1 + ledger_device_sdk/src/ui/gadgets.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ledger_device_sdk/src/io.rs b/ledger_device_sdk/src/io.rs index eee6d000..f80f3e79 100644 --- a/ledger_device_sdk/src/io.rs +++ b/ledger_device_sdk/src/io.rs @@ -23,6 +23,7 @@ pub enum StatusWords { UserCancelled = 0x6e04, Unknown = 0x6d00, Panic = 0xe000, + DeviceLocked = 0x5515, } #[derive(Debug)] diff --git a/ledger_device_sdk/src/ui/gadgets.rs b/ledger_device_sdk/src/ui/gadgets.rs index 464f5b62..bb2d5545 100644 --- a/ledger_device_sdk/src/ui/gadgets.rs +++ b/ledger_device_sdk/src/ui/gadgets.rs @@ -603,7 +603,8 @@ impl<'a> MultiPageMenu<'a> { // pin lock management let (_res, ins) = UxEvent::block_and_get_event::(self.comm); if let Some(_e) = ins { - self.comm.reply::(io::StatusWords::Unknown); + self.comm + .reply::(io::StatusWords::DeviceLocked); } // notify Ticker event only when redisplay is required return EventOrPageIndex::Event(io::Event::Ticker);