Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

useEagerConnect does not work on SSR #17

Open
fsouzadi1995 opened this issue Dec 10, 2021 · 1 comment
Open

useEagerConnect does not work on SSR #17

fsouzadi1995 opened this issue Dec 10, 2021 · 1 comment

Comments

@fsouzadi1995
Copy link

fsouzadi1995 commented Dec 10, 2021

Hi!

I'm not sure if I'm completely missing the point here, but it seems that useEagerConnect() does not currently work on Next.js or any prerendered site since the window.ethereumproperty cannot be accessed server-side.

I've tried both creating my own project from scratch and also cloned this one to confirm it.

I'm also getting the following console output:

MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.
For more information, see: https://eips.ethereum.org/EIPS/eip-1193

I'm quite new to SSR so I might be doing some stuff the wrong way.

@mirshko
Copy link
Owner

mirshko commented Dec 13, 2021

Hey there!

So the console warning you're seeing is from the upstream library web3-react, this will be fixed in the newest version of web3-react which is currently under development.

Regarding useEagerConnect, you're correct this won't connect to your wallet while loading but should after the fact, are you seeing an error when using this? Or is it not working at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants