wagmi icon indicating copy to clipboard operation
wagmi copied to clipboard

useWriteContract cannot return hash normally when using wallet-connect connector

Open c0da523 opened this issue 2 years ago • 5 comments

Check existing issues

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

  1. Click connect btn and choose wallet connect ;
  2. Input any number in the textinput, then click the mint button;
  3. Approve the transaction operation showing on your mobile;
  4. 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

c0da523 avatar Aug 02 '24 07:08 c0da523

Works fine for me. What wallet are you using with WalletConnect?

tmm avatar Aug 02 '24 14:08 tmm

Works fine for me. What wallet are you using with WalletConnect?

Metamask, and Sepolia testnet.

c0da523 avatar Aug 03 '24 07:08 c0da523

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

c0da523 avatar Aug 03 '24 08:08 c0da523

I get the same bug but it only happen with Android device, IOS device still work good

lozyloop12 avatar Aug 15 '24 04:08 lozyloop12

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.

github-actions[bot] avatar Aug 30 '24 00:08 github-actions[bot]