-
Notifications
You must be signed in to change notification settings - Fork 928
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
Wagmi v2 migration #700
Wagmi v2 migration #700
Conversation
IN PROGRESS
|
Should we also change the names of some hooks and the variables in the files
|
Hey @KcPele thanks for this !! Actually we are planning to remove Also for Wagmi v2 migration, I think its better if core contributors take up the tasks since they have overall context and also its easy for review since this migration seems a bit messier But thanks so much for showing enthusiasm! |
Ok, thanks for the feedback, I am very much available if you need any task done, I would like to be assigned any minor migration task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working great for me!!
Awesome job @technophile-04 !!!
Been testing this for a while on the branch Thanks to @Pabl0cks, noticed a bug yesterday that if you are using In SE-2 wagmi v1 it seems to works fine. I created two branches to test Here is Demo video:Screen.Recording.2024-04-10.at.2.55.33.PM.mov
Here is Demo Video:Screen.Recording.2024-04-10.at.3.01.02.PM.mov
Not sure if it's something to do with how tanstack query is working internall (maybe since both hooks has same query key and its kindof getting confused / not able to handle it properly since our Nevertheless, I think we should merge this PR if everything looks good to all and then we can tackle this issue separately and nicely Thanks all for testing and reviews !!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevertheless, I think we should merge this PR if everything looks good to all and then we can tackle this issue separately and nicely
Agree! Approving 🙌
Two points:
- During my tests I've also noticed it was taking some time to refresh the updates on balances/variables in localhost, something like 10-12 secs. Maybe we could lower the
pollingInterval
for hardhat. - Maybe we could sync the merge with docs update.
Incredible job @technophile-04 tackling this update, hats off to you! 🎩🤓
My stupid brain used the reversed condition to configure Ok so, I think we are ready to merge this maybe this week or early next week, as soon as is scaffold-eth/se-2-docs#61 is ready 🚀 Just writing summary / pending things from this PR : Discussion on
|
Thank you @technophile-04 for this amazing work! And @damianmarti @Pabl0cks @rin-st for the great feedback & discussions. Happy to merge this when the docs are ready. |
I think we are ready with docs scaffold-eth/se-2-docs#61, Thanks to @Pabl0cks 🚀 |
Great! Let's wait until Monday haha |
@technophile-04 Whenever you want => push the 🔴 button haha |
TYSM All !! Just did a final test locally, deployed contracts and works nice (https://wagmi-v2-test.vercel.app) here is the wagmi-v2-test (We could probably delete this branch after 3-4 days), Lol I am sure there might be some bugs / edge cases which we have missed but we can conquer them as they come 🙌 |
Current noticed bugs:
0x${string}
for example checkout this (fixed at 23179fa)📝 Notes:
Misc Notes:
Chain not configured
error make sure we passchainId
to hooks (eg b6f406a)onError
were removed fromuseQuery
(RFC: remove callbacks from useQuery TanStack/query#5279)Helpful resources for burnerWallet :
Discussion created on viem repo and discord dicussion
Wagmi creating Connector guide : https://wagmi.sh/dev/creating-connectors
Wagmi mock connector: https://github.com/wevm/wagmi/blob/main/packages/core/src/connectors/mock.ts#L15
Raibow kit WalletConnector implementation : https://github.com/rainbow-me/rainbowkit/blob/main/packages/rainbowkit/src/wallets/getWalletConnectConnector.ts
Raibow kit Custom Wallet section : https://www.rainbowkit.com/docs/custom-wallets
Viem http Transport : https://github.com/wevm/viem/blob/main/src/utils/rpc/http.ts#L24
Viem Custom transport : https://viem.sh/docs/clients/transports/custom
Safe Provider : https://github.com/safe-global/safe-apps-sdk/blob/main/packages/safe-apps-provider/src/provider.ts#L1
Done tasks:
targetNetworks
(@technophile-04)yarn start
working (@technophile-04)Fixes #678