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