fix: handle confirmationStatus field in TransactionStatus (#14583)
This commit is contained in:
parent
0fd21018d6
commit
299b3eb99d
|
@ -93,10 +93,16 @@ declare module '@solana/web3.js' {
|
|||
searchTransactionHistory: boolean;
|
||||
};
|
||||
|
||||
export type TransactionConfirmationStatus =
|
||||
| 'processed'
|
||||
| 'confirmed'
|
||||
| 'finalized';
|
||||
|
||||
export type SignatureStatus = {
|
||||
slot: number;
|
||||
err: TransactionError | null;
|
||||
confirmations: number | null;
|
||||
confirmationStatus: TransactionConfirmationStatus | null;
|
||||
};
|
||||
|
||||
export type ConfirmedSignatureInfo = {
|
||||
|
|
|
@ -108,10 +108,16 @@ declare module '@solana/web3.js' {
|
|||
searchTransactionHistory: boolean,
|
||||
};
|
||||
|
||||
declare export type TransactionConfirmationStatus =
|
||||
| 'processed'
|
||||
| 'confirmed'
|
||||
| 'finalized';
|
||||
|
||||
declare export type SignatureStatus = {
|
||||
slot: number,
|
||||
err: TransactionError | null,
|
||||
confirmations: number | null,
|
||||
confirmationStatus: TransactionConfirmationStatus | null,
|
||||
};
|
||||
|
||||
declare export type ConfirmedSignatureInfo = {
|
||||
|
|
|
@ -1090,6 +1090,7 @@ const GetSignatureStatusesRpcResult = jsonRpcResultAndContext(
|
|||
slot: 'number',
|
||||
confirmations: struct.union(['number', 'null']),
|
||||
err: TransactionErrorResult,
|
||||
confirmationStatus: 'string?',
|
||||
}),
|
||||
]),
|
||||
]),
|
||||
|
@ -1577,11 +1578,13 @@ export type TransactionError = {};
|
|||
* @property {number} slot when the transaction was processed
|
||||
* @property {number | null} confirmations the number of blocks that have been confirmed and voted on in the fork containing `slot` (TODO)
|
||||
* @property {TransactionError | null} err error, if any
|
||||
* @property {string | null} confirmationStatus the transaction's cluster confirmation status, if data available. Possible non-null responses: `processed`, `confirmed`, `finalized`
|
||||
*/
|
||||
export type SignatureStatus = {
|
||||
slot: number,
|
||||
confirmations: number | null,
|
||||
err: TransactionError | null,
|
||||
confirmationStatus: string | null,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue