Skip to content
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

Feature: Wallet migration #977

Merged
merged 39 commits into from
Mar 18, 2025
Merged

Feature: Wallet migration #977

merged 39 commits into from
Mar 18, 2025

Conversation

hernandoagf
Copy link
Collaborator

@hernandoagf hernandoagf commented Mar 4, 2025

What does this PR do?

  • Add wagmi config
  • Hook wagmi config to the connect, account and chain modals
  • Replace web3-react hooks for wagmi hooks
  • Replace all web3-react functionality for Wagmi and Viem
  • Replace all ethers imports for their Viem equivalent
  • Replace all BigNumber references for BigInts
  • Update Defender Relay client to use the default Relay export instead of the ethers version
  • Add batched requests when fetching some on chain logs as the response from Viem is larger than the max response size allowed
  • Remove web3-react, ethers and Bignumber.js packages

Misc:

  • Update Typescript to v5 due to compatibility issues between v4 and Wagmi/Viem
  • Update theme-ui to v0.16 due to build errors when updating Typescript (this also got rid of all of the linter issues with the theme-ui components)

@hernandoagf hernandoagf added the WIP label Mar 4, 2025
Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
governance-portal-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 4:51pm

Copy link

socket-security bot commented Mar 4, 2025

Report too large to display inline

View full report↗︎

@hernandoagf hernandoagf changed the title Add wagmi config and start replacing web3-react Feature: Wallet migration Mar 14, 2025
Copy link
Collaborator

@adamgoth adamgoth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed some very small changes for some minor issues I found while testing, but all the transactions worked as expected.

What a beast of a PR. Excellent work! 🔥

@adamgoth
Copy link
Collaborator

One more note: Not urgent, but we can update the references to ethers in the README to wagmi/viem

@hernandoagf hernandoagf marked this pull request as ready for review March 17, 2025 16:10
Copy link
Collaborator

@b-pmcg b-pmcg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! In addition to what Adam said, we also want to update the README steps to get it running locally & the sample.env. Also found some SKY number formatting issues but they can probably be addressed in a different PR. Good to get this merged into the main feature branch soon!

@hernandoagf hernandoagf merged commit 53275d9 into new-delegate-factory Mar 18, 2025
5 of 9 checks passed
@hernandoagf hernandoagf deleted the wallet-refactor branch March 18, 2025 17:54
@hernandoagf hernandoagf restored the wallet-refactor branch March 18, 2025 17:56
hernandoagf added a commit that referenced this pull request Mar 18, 2025
@hernandoagf hernandoagf deleted the wallet-refactor branch March 18, 2025 17:57
@hernandoagf hernandoagf restored the wallet-refactor branch March 19, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants