You can also do it like this, by specifying number of block confirmations you'd like to wait for before proceeding. Note: You'll have to first instantiate account and target contract with web3. (https://web3js.readthedocs.io/en/v1.2.11/callbacks-promises-events.html): const encoded = await tokenContract.methods.approve(routerAddr, amountToSend).encodeABI() const tx = { gas: 100000, to: tokenAddr, data: encoded } const signedTx = await account.signTransaction(tx); console.log("Sending transaction..."); const targetConfirmations = 3; await new Promise((resolve, reject) => { const promiEvent = web3.eth.sendSignedTransaction(signedTx.rawTransaction); promiEvent .on('confirmation', (confNumber, receipt) => { console.log("Confirmation number:", confNumber); if (confNumber >= targetConfirmations) { console.log(`Received ${targetConfirmations} confirmations. Transaction is confirmed.`); promiEvent.off('confirmation'); // Remove all confirmation handlers resolve(receipt); // Resolve the promise after the desired confirmations } }) .on('error', error => { console.error("Error:", error); reject(error); // Reject the promise if there's an error }); });