How to stop invoking getTransactionReceipt after sendSignedTransaction

Hello everyone.
On my infura usage statistics I can see large usage of eth_getTransactionReceipt (10 times higher then the next mentioned method), however I only use web3.eth.sendSignedTransaction in my scripts.

My suspicion is that eth_getTransactionReceipt is fired on regular interval until sendSignedTransaction gets resolved (via receipt or error or 750s timeout error).
Is there any way to prevent it or stop it? Its wasteful especially for replaced tx, that gets never mined.
Remove listeners has no impact on it, neither web3.eth.unsubscribe doesn’t seem to have anything with it.
Any ideas?

Hi @krychla - welcome to the Infura community! Unfortunately, that’s not something Infura can affect, but you can open an issue at the web3 repo, or you can use ethers.js instead of web3. Hope this helps!

Thank you for quick reply Leyia.
Do you have any experience with ethers.js? Does it offer more possibilities?

I have some experience with it, yes. Ethers.js is a bit more intuitive than Web3.js, and it’s a smaller, more compact library with more test cases. If you want to know more about the differences between the two, take a look at this blog post comparing the two.

The ethers.js docs are well-written; check out their documentation on signers, which may help you out.

I’ll take a look. Thank you very much!