Write Contract retries 3 times when UnknownRpcError code -1 received from Wallet Connect/Fireblocks #3137
Closed
1 task done
Labels
needs reproduction
Misc: Needs Reproduction
Check existing issues
Viem Version
viem: 2.21.55, wagmi: 2.14.3
Current Behavior
Contract writes retry three times in some cases. Potentially specific to Wallet Connect / Fireblocks and mishandling an exception thrown by during use of that combination.
Expected Behavior
I think I would expect no retries at all for any contract write whatsoever. In the wagmi documentation it stays the default for retry count for mutations is 0 here.
It is quite dangerous and has caused confusion with us and our customers alike. In our context, it happens when a customer goes to use our app to buy or sell tokens. Transaction approvals land in Fireblocks, if they take too long to approve, or have insufficient funds for the network fee, it will retry three times, tripping up users trying to approve or deny these transactions.
Steps To Reproduce
We have seen this occur in some other cases as well, like taking too long to approve a transaction in Fireblocks, but the above is the easiest way to reproduce.
This may not be specific though to using Wallet Connect and Fireblocks, from a brief look, it's simply if an RPC error is thrown with code -1.
Link to Minimal Reproducible Example
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: