diff --git a/CHANGELOG.md b/CHANGELOG.md index 168a88dd049..a9dcb72b421 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -446,9 +446,9 @@ Released with 1.0.0-beta.37 code base. - lerna from 3.22.1 to 4.0.0 (#4231) - Dropped build tests in CI for Node v8 and v10, and added support for Node v14 - Change default value for `maxPriorityFeePerGas` from `1 Gwei` to `2.5 Gwei` (#4284) +- Introduced new configuration "blockHeaderTimeout" for waiting of block headers for transaction receipt (#3891) - Fixed bug in signTransaction (#4295) - Format `block.baseFeePerGas` to number (#4330) -- Introduced new configuration "blockHeaderTimeout" for waiting of block headers for transaction receipt (#3891) ## [Unreleased] @@ -463,3 +463,4 @@ Released with 1.0.0-beta.37 code base. ### Changed - Not considering `tx.chainId` if `tx.common.customChain.chainId` is provided for `web3.eth.accounts.signTransaction` function (#4293) +- Added missing PromiEvent handler types (#4194) diff --git a/packages/web3-core/types/index.d.ts b/packages/web3-core/types/index.d.ts index adc7692213f..9845e3e61c5 100644 --- a/packages/web3-core/types/index.d.ts +++ b/packages/web3-core/types/index.d.ts @@ -87,8 +87,18 @@ export interface PromiEvent extends Promise { once(type: 'error', handler: (error: Error) => void): PromiEvent; once( - type: 'error' | 'confirmation' | 'receipt' | 'transactionHash', - handler: (error: Error | TransactionReceipt | string) => void + type: 'error' | 'confirmation' | 'receipt' | 'transactionHash' | 'sent' | 'sending', + handler: (error: Error | TransactionReceipt | string | object) => void + ): PromiEvent; + + on( + type: 'sending', + handler: (payload: object) => void + ): PromiEvent; + + on( + type: 'sent', + handler: (payload: object) => void ): PromiEvent; on( @@ -109,8 +119,8 @@ export interface PromiEvent extends Promise { on(type: 'error', handler: (error: Error) => void): PromiEvent; on( - type: 'error' | 'confirmation' | 'receipt' | 'transactionHash', - handler: (error: Error | TransactionReceipt | string) => void + type: 'error' | 'confirmation' | 'receipt' | 'transactionHash' | 'sent' | 'sending', + handler: (error: Error | TransactionReceipt | string | object) => void ): PromiEvent; }