Skip to content

docs: update MiniPay quickstart wagmi examples to v2#2195

Merged
viral-sangani merged 1 commit into
mainfrom
GigaHierz/review-docs-pr-2193
Jun 16, 2026
Merged

docs: update MiniPay quickstart wagmi examples to v2#2195
viral-sangani merged 1 commit into
mainfrom
GigaHierz/review-docs-pr-2193

Conversation

@GigaHierz

Copy link
Copy Markdown
Contributor

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-style injected({ 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

  • Replace the v1 InjectedConnector pattern with a complete wagmi v2 setup: createConfig + WagmiProvider + QueryClientProvider, plus a config-driven useConnect() auto-connect snippet (the connector passed to connect() is the one registered in createConfig — no mismatch).
  • Add a <Note> callout explaining the v1→v2 differences (functions vs classes, WagmiConfigWagmiProvider, createConfig).
  • Complete the imports in the "hide connect button" example and add connect to the effect deps so it's internally consistent.

RPC uses bare http() and celo from wagmi/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

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>
@GigaHierz GigaHierz requested a review from a team as a code owner June 16, 2026 09:33
@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
celo-docs 🟢 Ready View Preview Jun 16, 2026, 9:36 AM

@viral-sangani viral-sangani merged commit 6ab5f15 into main Jun 16, 2026
4 checks passed
@viral-sangani viral-sangani deleted the GigaHierz/review-docs-pr-2193 branch June 16, 2026 14:11
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.

2 participants