Skip to content

Commit be36bab

Browse files
authored
Correct the type of innerInstructions in JSON RPC errors (#2867)
These names are camel-cased. This can't be imported from `@solana/rpc-types` because `@solana/errors` must be zero dependency.
1 parent 73bd5a9 commit be36bab

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.changeset/sour-mugs-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@solana/errors': patch
3+
---
4+
5+
The `innerInstructions` property of JSON-RPC errors used snake case rather than camelCase for `stackHeight` and `programId`. This has been corrected.

packages/errors/src/json-rpc-error.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ export interface RpcSimulateTransactionResult {
6161
accounts: number[];
6262
data: string;
6363
programIdIndex: number;
64-
stack_height?: number;
64+
stackHeight?: number;
6565
}
6666
| {
6767
// Parsed
6868
parsed: unknown;
6969
program: string;
70-
program_id: string;
71-
stack_height?: number;
70+
programId: string;
71+
stackHeight?: number;
7272
}
7373
| {
7474
// PartiallyDecoded
7575
accounts: string[];
7676
data: string;
77-
program_id: string;
78-
stack_height?: number;
77+
programId: string;
78+
stackHeight?: number;
7979
}
8080
)[];
8181
}[]

0 commit comments

Comments
 (0)