Skip to content

Commit

Permalink
✨ (signer-solana): Add custom errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fAnselmi-Ledger committed Nov 14, 2024
1 parent 6fbe971 commit 7fcfd1e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Tests
id: unit-tests
if: ${{ steps.health-check.conclusion == 'success' }}
run: pnpm test:coverage -- --max-warnings=0
run: pnpm test:coverage -- --max-warnings=0 --maxWorkers=2

- uses: sonarsource/sonarqube-scan-action@v3
if: ${{ steps.unit-tests.conclusion == 'success' && github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.fork == 'false' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Tests
id: unit-tests
if: steps.changes.outputs.status > 0 && success()
run: pnpm test:coverage -- --max-warnings=0
run: pnpm test:coverage -- --max-warnings=0 --maxWorkers=2

- name: Create PR
if: steps.changes.outputs.status > 0 && success()
Expand Down
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" },
};

0 comments on commit 7fcfd1e

Please sign in to comment.