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

feat: wagmi v2 #1588

Merged
merged 53 commits into from
Jan 17, 2024
Merged

feat: wagmi v2 #1588

merged 53 commits into from
Jan 17, 2024

Conversation

tomiir
Copy link
Collaborator

@tomiir tomiir commented Dec 19, 2023

Breaking Changes

  • Users will be required to use viem2 and tanstack query in order for this to work.
  • Around half of Wagmi's interfaces changed.
  • WagmiConfig is no longer supported, WagmiProvider should be used instead.
  • Wagmi's hooks are no longer valid when using the new client.

For complete notes see:

Changes

  • feat: wagmi-v2 integration
  • fix:
  • chore:

Notes

  • Created new V4 branch off of commit 707c505.
  • v2 includes multi account support oob. This means we no longer need our custom connector and no longer flag these connectors as ANNOUNCED. Maybe there's something we want to do here in order to keep in line with other versions of the lib?
  • Right now this is using default viem http transport. We were previously providing the WC Blockchain API transport as well but now we need to expose a client with a specific transport. Do we want to use the WC one as main or keep the public default client as main?

Associated Issues

#1587

Copy link

vercel bot commented Dec 19, 2023

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

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview Jan 17, 2024 4:21pm
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Jan 17, 2024 4:21pm
web3modal-react-wagmi-ex ✅ Ready (Inspect) Visit Preview Jan 17, 2024 4:21pm
web3modal-vue-wagmi-ex ✅ Ready (Inspect) Visit Preview Jan 17, 2024 4:21pm

ThemeStore.setModal(modal)

export default function Wagmi() {
const [ready, setReady] = useState(false)
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be removed, we could add SSR config instead: https://beta.wagmi.sh/react/guides/ssr

connectors,
publicClient
multiInjectedProviderDiscovery: enableEIP6963 !== false
Copy link
Contributor

Choose a reason for hiding this comment

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

in order to support more features (like SSR) in our defaultWagmiConfig can we add a spread operator?

Suggested change
multiInjectedProviderDiscovery: enableEIP6963 !== false
multiInjectedProviderDiscovery: enableEIP6963 !== false,
...wagmiOptions

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

Successfully merging this pull request may close these issues.

4 participants