-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (signer-solana): Add custom errors
- Loading branch information
1 parent
6fbe971
commit 7fcfd1e
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/signer/signer-solana/src/internal/app-binder/command/utils/solanaAppErrors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { type CommandErrors } from "@ledgerhq/device-management-kit"; | ||
|
||
export type SolanaAppErrorCodes = | ||
| "6700" | ||
| "6982" | ||
| "6A80" | ||
| "6A81" | ||
| "6A82" | ||
| "6B00" | ||
| "9000"; | ||
|
||
export const solanaAppErrors: CommandErrors<SolanaAppErrorCodes> = { | ||
"6700": { message: "Incorrect length" }, | ||
"6982": { message: "Security status not satisfied (Canceled by user)" }, | ||
"6A80": { message: "Invalid data" }, | ||
"6A81": { message: "Invalid off-chain message header" }, | ||
"6A82": { message: "Invalid off-chain message format" }, | ||
"6B00": { message: "Incorrect parameter P1 or P2" }, | ||
"9000": { message: "Normal ending of the command" }, | ||
}; |