From 682a66a37403f2df88aa2c05013b64ee3c4b2176 Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Mon, 7 Oct 2024 14:33:29 -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 | 2 +- 2 files changed, 2 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..6f24dfff 100644 --- a/ledger_device_sdk/src/ui/gadgets.rs +++ b/ledger_device_sdk/src/ui/gadgets.rs @@ -603,7 +603,7 @@ 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);