Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prestwich/invalid data #134

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ledger/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "coins-ledger"
version = "0.9.3"
version = "0.10.0"
authors = [
"Summa <team@summa.one>",
"James Prestwich <james@summa.one>",
Expand Down
10 changes: 5 additions & 5 deletions ledger/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ pub enum APDUResponseCodes {
ConditionsNotSatisfied = 0x6985,
/// CommandNotAllowed
CommandNotAllowed = 0x6986,
/// BadKeyHandle
BadKeyHandle = 0x6A80,
/// InvalidData
InvalidData = 0x6A80,
/// InvalidP1P2
InvalidP1P2 = 0x6B00,
/// InsNotSupported
Expand Down Expand Up @@ -261,8 +261,8 @@ impl APDUResponseCodes {
APDUResponseCodes::CommandNotAllowed => {
"[APDU_CODE_COMMAND_NOT_ALLOWED] Command not allowed (no current EF)"
}
APDUResponseCodes::BadKeyHandle => {
"[APDU_CODE_BAD_KEY_HANDLE] The parameters in the data field are incorrect"
APDUResponseCodes::InvalidData => {
"[APDU_CODE_INBALID_DATA] The parameters in the data field are incorrect"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo INBALID INVALID 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

killing it.

}
APDUResponseCodes::InvalidP1P2 => "[APDU_CODE_INVALIDP1P2] Wrong parameter(s) P1-P2",
APDUResponseCodes::InsNotSupported => {
Expand Down Expand Up @@ -291,7 +291,7 @@ impl TryFrom<u16> for APDUResponseCodes {
0x6984 => Ok(APDUResponseCodes::DataInvalid),
0x6985 => Ok(APDUResponseCodes::ConditionsNotSatisfied),
0x6986 => Ok(APDUResponseCodes::CommandNotAllowed),
0x6A80 => Ok(APDUResponseCodes::BadKeyHandle),
0x6A80 => Ok(APDUResponseCodes::InvalidData),
0x6B00 => Ok(APDUResponseCodes::InvalidP1P2),
0x6D00 => Ok(APDUResponseCodes::InsNotSupported),
0x6E00 => Ok(APDUResponseCodes::ClaNotSupported),
Expand Down
Loading