I want my dApp to automatically rebroadcast a transaction if after 50 blocks it is still unmined. How can I do this in javascript with web3 1, having all infos about the pending one? (txHash, ecc)

2 Answers 2


You can repeat the transaction, sending transaction with the same nonce. Note that you'd better place a bigger fee on it (10%+). You can also try changing the transaction's original nonce, e.g., incrementing nonce value by one. You can find some additional info here.


I found that it can be done by performing web3.eth.sendTransaction again and using the same nonce parameter.


  • 1
    As @Sovan mentioned in his answer it is better to increase your tx fee by 10% by changing your gas parameter in your transaction object. If you are willing to do it in loop, be sure to set the limit so the fee will not accidentially become too high. And also if your answer answers your question accept it by clicking check mark below down vote of your answer. Jan 13, 2018 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.