fix: handle confirmationStatus field in TransactionStatus (#14583)
This commit is contained in:
6
web3.js/module.d.ts
vendored
6
web3.js/module.d.ts
vendored
@ -93,10 +93,16 @@ declare module '@solana/web3.js' {
|
|||||||
searchTransactionHistory: boolean;
|
searchTransactionHistory: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type TransactionConfirmationStatus =
|
||||||
|
| 'processed'
|
||||||
|
| 'confirmed'
|
||||||
|
| 'finalized';
|
||||||
|
|
||||||
export type SignatureStatus = {
|
export type SignatureStatus = {
|
||||||
slot: number;
|
slot: number;
|
||||||
err: TransactionError | null;
|
err: TransactionError | null;
|
||||||
confirmations: number | null;
|
confirmations: number | null;
|
||||||
|
confirmationStatus: TransactionConfirmationStatus | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ConfirmedSignatureInfo = {
|
export type ConfirmedSignatureInfo = {
|
||||||
|
@ -108,10 +108,16 @@ declare module '@solana/web3.js' {
|
|||||||
searchTransactionHistory: boolean,
|
searchTransactionHistory: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
declare export type TransactionConfirmationStatus =
|
||||||
|
| 'processed'
|
||||||
|
| 'confirmed'
|
||||||
|
| 'finalized';
|
||||||
|
|
||||||
declare export type SignatureStatus = {
|
declare export type SignatureStatus = {
|
||||||
slot: number,
|
slot: number,
|
||||||
err: TransactionError | null,
|
err: TransactionError | null,
|
||||||
confirmations: number | null,
|
confirmations: number | null,
|
||||||
|
confirmationStatus: TransactionConfirmationStatus | null,
|
||||||
};
|
};
|
||||||
|
|
||||||
declare export type ConfirmedSignatureInfo = {
|
declare export type ConfirmedSignatureInfo = {
|
||||||
|
@ -1090,6 +1090,7 @@ const GetSignatureStatusesRpcResult = jsonRpcResultAndContext(
|
|||||||
slot: 'number',
|
slot: 'number',
|
||||||
confirmations: struct.union(['number', 'null']),
|
confirmations: struct.union(['number', 'null']),
|
||||||
err: TransactionErrorResult,
|
err: TransactionErrorResult,
|
||||||
|
confirmationStatus: 'string?',
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
@ -1577,11 +1578,13 @@ export type TransactionError = {};
|
|||||||
* @property {number} slot when the transaction was processed
|
* @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 {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 {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 = {
|
export type SignatureStatus = {
|
||||||
slot: number,
|
slot: number,
|
||||||
confirmations: number | null,
|
confirmations: number | null,
|
||||||
err: TransactionError | null,
|
err: TransactionError | null,
|
||||||
|
confirmationStatus: string | null,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user