fix: getConfirmedBlock result pattern fixup
This commit is contained in:
committed by
Michael Vines
parent
a461d5f25f
commit
2d5ace244a
@ -75,7 +75,9 @@ declare module '@solana/web3.js' {
|
|||||||
blockhash: Blockhash,
|
blockhash: Blockhash,
|
||||||
previousBlockhash: Blockhash,
|
previousBlockhash: Blockhash,
|
||||||
parentSlot: number,
|
parentSlot: number,
|
||||||
transactions: Array<[Transaction, SignatureSuccess | TransactionError | null]>,
|
transactions: Array<
|
||||||
|
[Transaction, SignatureSuccess | TransactionError | null],
|
||||||
|
>,
|
||||||
};
|
};
|
||||||
|
|
||||||
declare export type KeyedAccountInfo = {
|
declare export type KeyedAccountInfo = {
|
||||||
|
@ -399,15 +399,15 @@ const GetVoteAccounts = jsonRpcResult(
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const SignatureStatusResult = struct.union([
|
||||||
|
'null',
|
||||||
|
struct.union([struct({Ok: 'null'}), struct({Err: 'object'})]),
|
||||||
|
]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expected JSON RPC response for the "getSignatureStatus" message
|
* Expected JSON RPC response for the "getSignatureStatus" message
|
||||||
*/
|
*/
|
||||||
const GetSignatureStatusRpcResult = jsonRpcResult(
|
const GetSignatureStatusRpcResult = jsonRpcResult(SignatureStatusResult);
|
||||||
struct.union([
|
|
||||||
'null',
|
|
||||||
struct.union([struct({Ok: 'null'}), struct({Err: 'object'})]),
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expected JSON RPC response for the "getTransactionCount" message
|
* Expected JSON RPC response for the "getTransactionCount" message
|
||||||
@ -463,7 +463,7 @@ export const GetConfirmedBlockRpcResult = jsonRpcResult(
|
|||||||
struct.union([
|
struct.union([
|
||||||
'null',
|
'null',
|
||||||
struct({
|
struct({
|
||||||
status: GetSignatureStatusRpcResult,
|
status: SignatureStatusResult,
|
||||||
fee: 'number',
|
fee: 'number',
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
|
Reference in New Issue
Block a user