useWriteContract cannot return hash normally when using wallet-connect connector
Check existing issues
- [X] I checked there isn't already an issue for the bug I encountered.
Describe the bug
I am doing approve operation using wallet connect ;
const { data: hash, error, isPending, writeContract } = useWriteContract();
The hash is always undefined and isPending always return true ;
Link to Minimal Reproducible Example
https://stackblitz.com/edit/vitejs-vite-1i1mxn?file=package.json
Steps To Reproduce
- Click connect btn and choose wallet connect ;
- Input any number in the textinput, then click the mint button;
- Approve the transaction operation showing on your mobile;
- Waiting for the transaction confirmed (But it will not);
What Wagmi package(s) are you using?
wagmi, @wagmi/connectors
Wagmi Package(s) Version(s)
2.12.2
Viem Version
2.13.7
TypeScript Version
5.2.2
Anything else?
no
Works fine for me. What wallet are you using with WalletConnect?
Works fine for me. What wallet are you using with WalletConnect?
Metamask, and Sepolia testnet.
Works fine for me. What wallet are you using with WalletConnect?
Have you ever tried this link? Using Metamask mobile app to scan the wallect-connect qrcode, then switch to sepolia network
I get the same bug but it only happen with Android device, IOS device still work good
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.