fix: simulateTransaction accounts items can be null (#23229)
* fix: simulated accounts can be null * Use Missing rather than token program id Co-authored-by: Arrowana <8245419+Arrowana@users.noreply.github.com>
This commit is contained in:
@@ -469,7 +469,7 @@ export type SimulatedTransactionAccountInfo = {
|
||||
export type SimulatedTransactionResponse = {
|
||||
err: TransactionError | string | null;
|
||||
logs: Array<string> | null;
|
||||
accounts?: SimulatedTransactionAccountInfo[] | null;
|
||||
accounts?: (SimulatedTransactionAccountInfo | null)[] | null;
|
||||
unitsConsumed?: number;
|
||||
};
|
||||
|
||||
@@ -480,13 +480,15 @@ const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(
|
||||
accounts: optional(
|
||||
nullable(
|
||||
array(
|
||||
pick({
|
||||
executable: boolean(),
|
||||
owner: string(),
|
||||
lamports: number(),
|
||||
data: array(string()),
|
||||
rentEpoch: optional(number()),
|
||||
}),
|
||||
nullable(
|
||||
pick({
|
||||
executable: boolean(),
|
||||
owner: string(),
|
||||
lamports: number(),
|
||||
data: array(string()),
|
||||
rentEpoch: optional(number()),
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user