Skip to content

chore: migrate to wagmi v3#233

Open
wenfix wants to merge 3 commits intomainfrom
am/WAPI-1257
Open

chore: migrate to wagmi v3#233
wenfix wants to merge 3 commits intomainfrom
am/WAPI-1257

Conversation

@wenfix
Copy link
Contributor

@wenfix wenfix commented Mar 18, 2026

Explanation

Upgrades wagmi and related dependencies to their latest versions, and applies the required v2→v3 migration changes.

Package bumps

Package Before After
wagmi ^2.19.2 ^3.5.0
@wagmi/core ^2.22.1 ^3.4.0
@wagmi/cli ^2.3.2 ^2.10.0
@tanstack/react-query >=5.45.1 ^5.90.21
@tanstack/react-query-persist-client 5.0.5 ^5.90.24
@tanstack/react-query-devtools 5.0.5 ^5.91.3
@tanstack/query-sync-storage-persister 5.0.5 ^5.90.24
@tanstack/query-async-storage-persister 5.0.5 ^5.90.24

viem remains at 2.* — wagmi 3.x still targets viem 2.x.

wagmi v3 migration changes

wagmi v3 renamed several hooks and removed properties that were accessible via destructuring:

  • useConnect().connectors removed → use useConnectors() standalone hook
  • useSwitchChain().chains removed → use useChains() standalone hook
  • useSwitchAccount().connectors removed → derive from useConnections().map(c => c.connector)
  • useAccountuseConnection
  • useAccountEffectuseConnectionEffect
  • useSwitchAccountuseSwitchConnection

References

Fixes WAPI-1257

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@wenfix wenfix requested a review from a team as a code owner March 18, 2026 12:52
@socket-security
Copy link

socket-security bot commented Mar 18, 2026

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.

1 participant