docs: update MiniPay quickstart wagmi examples to v2#2195
Merged
Conversation
Replace the wagmi v1 InjectedConnector pattern with a complete wagmi v2 setup (createConfig + WagmiProvider + QueryClientProvider) and a config-driven useConnect auto-connect snippet. Add a callout explaining the v1->v2 differences and complete the imports in the hide-connect-button example so it is internally consistent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
viral-sangani
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Updates the "Using Wagmi" section of the MiniPay quickstart (
build-on-celo/build-on-minipay/quickstart.mdx) from wagmi v1 to wagmi v2, the current major version.Why
The quickstart still taught the wagmi v1 pattern (
new InjectedConnector()+useConnect({ connector })), which no longer matches current wagmi. The page was also internally inconsistent — it showed the v1 class pattern in one snippet and a v2-styleinjected({ target: "metaMask" })call a few lines later, with incomplete imports.This came out of a review of #2193, which proposed adding a separate wagmi v2 section to
code-library.mdx. That page's snippets are already viem v2 and current, so rather than duplicate setup guidance there, the v2 patterns are folded into the quickstart where wallet setup naturally belongs.Changes
InjectedConnectorpattern with a complete wagmi v2 setup:createConfig+WagmiProvider+QueryClientProvider, plus a config-drivenuseConnect()auto-connect snippet (the connector passed toconnect()is the one registered increateConfig— no mismatch).<Note>callout explaining the v1→v2 differences (functions vs classes,WagmiConfig→WagmiProvider,createConfig).connectto the effect deps so it's internally consistent.RPC uses bare
http()andcelofromwagmi/chains, consistent with the rest of the docs.Note: #2193 can be closed in favor of this; its useful v2 patterns are incorporated here.
🤖 Generated with Claude Code