Skip to content

Commit

Permalink
Correct the type of innerInstructions in JSON RPC errors (#2867)
Browse files Browse the repository at this point in the history
These names are camel-cased. This can't be imported from `@solana/rpc-types` because `@solana/errors` must be zero dependency.
  • Loading branch information
steveluscher authored Jun 28, 2024
1 parent 73bd5a9 commit be36bab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-mugs-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solana/errors': patch
---

The `innerInstructions` property of JSON-RPC errors used snake case rather than camelCase for `stackHeight` and `programId`. This has been corrected.
10 changes: 5 additions & 5 deletions packages/errors/src/json-rpc-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ export interface RpcSimulateTransactionResult {
accounts: number[];
data: string;
programIdIndex: number;
stack_height?: number;
stackHeight?: number;
}
| {
// Parsed
parsed: unknown;
program: string;
program_id: string;
stack_height?: number;
programId: string;
stackHeight?: number;
}
| {
// PartiallyDecoded
accounts: string[];
data: string;
program_id: string;
stack_height?: number;
programId: string;
stackHeight?: number;
}
)[];
}[]
Expand Down

0 comments on commit be36bab

Please sign in to comment.