wevm / wagmi

Reactive primitives for Ethereum apps
https://wagmi.sh
MIT License
5.95k stars 1.04k forks source link

[bug] Unable to Connect to Coinbase Wallet on iOS #621

Closed JaegarSarauer closed 2 years ago

JaegarSarauer commented 2 years ago

Is there an existing issue for this?

Package Version

^0.4.12

Current Behavior

Attempting to connect to the Coinbase Wallet using the Coinbase Wallet Connector will fail silently on iOS using the wallet's built-in browser.

Expected Behavior

The connection status should update with a green check mark.

Steps To Reproduce

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

https://codesandbox.io/s/coinbase-wallet-demo-integrate-with-wagmi-psv1j0

Anything else?

A console error appears in the code sandbox:

makeWeb3Provider@
@

asyncFunctionResume@[native code]

@[native code]

promiseReactionJobWithoutPromise@[native code]

promiseReactionJob@[native code]

I have tested the coinbase wallet connection using Coinbase's other examples. I am able to create a connection using web3-react. Follow the above repro steps with the web3-react sandbox to witness expected behaviour.

Below is a screenshot of the modal just before attempting to connect: image

tmm commented 2 years ago

This was fixed in the latest version https://github.com/tmm/wagmi/pull/598

melissafzhang commented 2 years ago

@tmm I'm still seeing the same issue on 0.5.2

melissafzhang commented 2 years ago

@tmm created a repro here

JaegarSarauer commented 2 years ago

This issue was fixed for me on version 0.5.0.

melissafzhang commented 2 years ago

@JaegarSarauer interesting I'm still having the same issue even with 0.5.0. I've updated the codepen as well

melissafzhang commented 2 years ago

Just closing the loop here. Looks like the issue was fixed! My issue was that useConnect was throwing an error since Coinbase wallet was already connected. Feels like it probably should just return the account data instead of throwing an error.

github-actions[bot] commented 9 months ago

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 other comments you can create a new discussion.