Web3-React and Autoconnecting

A la these instructions: UX Guidelines

I have been trying to integrate my dapp with Coinbase Wallet, but the autoconnection method does not work for me - I send the window.ethereum.request({ method: "eth_requestAccounts" }request, but nothing happens in app. Does the autoconnection feature only work if you are using the Coinbase Wallet SDK?

Thanks!

Hello @grant-ab. Welcome to the forum! Thank you for taking an interest in trying out Coinbase APIs. For the details regarding your concern, we will check on this for you with our team. We will get back to you once we have more information. Keep in touch!

1 Like

Circling back here - found out you can just use ‘activate(…)’ to connect like you do elsewhere in Web3-React. So I think the documentation provided is incorrect

Hello @grant-ab. After following up with our team of specialists regarding your inquiry, I have confirmed that there won’t be an injected provider present on mobile if it’s outside the Dapp marketplace, hence, the “autoconnect” scenario doesn’t apply.

If you want to connect on mobile outside the Dapp marketplace, you will need to use the SDK. The requestAccounts call will deep link them into the Wallet app.

As for the documentation, we appreciate the feedback. However, based on your original post (which is about using the SDK or the injected provider directly), the doc you referenced isn’t about Web3-React and isn’t incorrect. Web3-React is a wrapper library with a different set of API surfaces. Please do note that we’re in the process of improving our documentation.

Thank you!

2 Likes

Hi @LaRisa - thanks for the reply. The dapp I am working on indeed is going to be inside of the Dapp marketplace

2 Likes