diff --git a/packages/web3-providers/src/Web3/Base/state/TransactionWatcher.ts b/packages/web3-providers/src/Web3/Base/state/TransactionWatcher.ts index 9a9220db5adc..6b1ef9954034 100644 --- a/packages/web3-providers/src/Web3/Base/state/TransactionWatcher.ts +++ b/packages/web3-providers/src/Web3/Base/state/TransactionWatcher.ts @@ -85,13 +85,15 @@ export abstract class TransactionWatcherState Array> }, - ) { + ) {} + + start() { const checker = new Checker(this.options.getTransactionCheckers(), this.subscriptions, { delay: this.options.defaultBlockDelay * 1000, onNotify: this.notifyTransaction.bind(this), }) - mergeSubscription(subscriptions.chainId, subscriptions.transactions).subscribe(() => { + mergeSubscription(this.subscriptions.chainId, this.subscriptions.transactions).subscribe(() => { checker.startCheck() }) } diff --git a/packages/web3-providers/src/Web3/EVM/apis/Web3StateAPI.ts b/packages/web3-providers/src/Web3/EVM/apis/Web3StateAPI.ts index e140173c9cb6..fbb3b5d8c22e 100644 --- a/packages/web3-providers/src/Web3/EVM/apis/Web3StateAPI.ts +++ b/packages/web3-providers/src/Web3/EVM/apis/Web3StateAPI.ts @@ -91,7 +91,6 @@ export async function createEVMState(context: WalletAPI.IOContext): Promise { ) => Promise> } export interface TransactionWatcherState { + start(): void emitter: Emitter> /** Notify error */