-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoConnect fix #395
autoConnect fix #395
Conversation
Tysm @Anurag-Raut 🙌 I actually tried the fix but it gave me a "Hydration Error" : Steps to reproduce :
Also if you switch to another chain than Could you please confirm the above error, Anurag? Thanks ! |
@technophile-04 I got through this issue by -rainbow-me/rainbowkit#944 (comment) I thought the problem was at my local setup. So the se-2 repo doesn't cause hydration error to other devs right? could you try in a prev working version if this error happens if you just changed the auto-connect variable to true in https://github.com/scaffold-eth/scaffold-eth-2/blob/main/packages/nextjs/services/web3/wagmiClient.tsx#L5C16-L5C21 |
Yes the the current I tried adding As I mentioned in previous comment the problem is only on hardhat network and it does not give hydration error even when Also I am not sure whats the perfect cause because as mentioned in this #391 (comment) it working fine for me before #356 soo need to look at it too |
I noticed that when network hardhat is selected , autoconnect functionality is working perfectly due to useAutoConnect hook in- but when we change auto connect to true in wagmiClient along with the hook , those two clashes with each other and hydration errors occurs. so made changes to pass down the scaffoldConfig.walletAutoConnected to wagmi connector only when current network It now works for both hardhat and other networks . could you look into it ? @technophile-04 |
Thanks 🙌 Umm with this fix we will be missing some cases like and it seems like a bit hacky to me : Steps to reproduce
Idea Condition
|
1d070b6
to
1021659
Compare
Description
walletAutoConnect declared in scaffold.config.ts was not passed down to WagmiClient .
In wagmiClient autoconnect is set to false. So even if we changed the value of walletAutoConnect in scaffold.config.ts changes were not reflected.
https://github.com/scaffold-eth/scaffold-eth-2/blob/main/packages/nextjs/services/web3/wagmiClient.tsx#L5
Additional Information
Related Issues
Closes #391
Your ENS/address: 0x72aA8A79D02705444CC6918A6766Be03AD4C29F5