From 80f0d323d846267dc1bc64ae2656f62e6564f253 Mon Sep 17 00:00:00 2001 From: xiaoguang Date: Thu, 22 Aug 2024 12:04:13 +0800 Subject: [PATCH] feat: imk support mnemonic verification feature --- imkey-core/ikc-common/src/apdu.rs | 1 + imkey-core/ikc-common/src/error.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/imkey-core/ikc-common/src/apdu.rs b/imkey-core/ikc-common/src/apdu.rs index 72de20e2..e11a9461 100644 --- a/imkey-core/ikc-common/src/apdu.rs +++ b/imkey-core/ikc-common/src/apdu.rs @@ -657,6 +657,7 @@ impl ApduCheck { "F080" => Err(ApduError::ImkeyInMenuPage.into()), "F081" => Err(ApduError::ImkeyPinNotVerified.into()), "6F01" => Err(ApduError::ImkeyBluetoothChannelError.into()), + "6943" => Err(ApduError::ImkeyMnemonicCheckFail.into()), _ => Err(anyhow!("imkey_command_execute_fail_{}", response_data)), //Err(ApduError::ImkeyCommandExecuteFail.into()) } } diff --git a/imkey-core/ikc-common/src/error.rs b/imkey-core/ikc-common/src/error.rs index d6420895..8ca00f62 100644 --- a/imkey-core/ikc-common/src/error.rs +++ b/imkey-core/ikc-common/src/error.rs @@ -40,6 +40,8 @@ pub enum ApduError { ImkeyInMenuPage, #[error("imkey_pin_not_verified")] ImkeyPinNotVerified, + #[error("imkey_mnemonic_check_fail")] + ImkeyMnemonicCheckFail, } #[derive(Error, Debug, PartialOrd, PartialEq)]