Skip to content

docs: add wagmi v2 + viem v2 MiniPay integration example with hydration fix#2193

Closed
2TheMoom wants to merge 1 commit into
celo-org:mainfrom
2TheMoom:main
Closed

docs: add wagmi v2 + viem v2 MiniPay integration example with hydration fix#2193
2TheMoom wants to merge 1 commit into
celo-org:mainfrom
2TheMoom:main

Conversation

@2TheMoom

@2TheMoom 2TheMoom commented Jun 9, 2026

Copy link
Copy Markdown

Adds a complete wagmi v2 + viem v2 integration example for MiniPay including:

  • createConfig with Celo chain
  • useMiniPay detection hook with auto-connect
  • Hide connect button pattern
  • React hydration error fix for Next.js 14 apps
  • wagmi v1 → v2 migration table

Based on a working implementation built for Celo Proof of Ship June 2026.
Live demo: https://celosense.vercel.app

Built and tested by Abu Olumi

@GigaHierz

Copy link
Copy Markdown
Contributor

Thanks for this! The wagmi v2 patterns here are genuinely useful, so I've incorporated them — with a few corrections — into the MiniPay quickstart instead, where the wallet setup naturally lives: #2195.

A couple of reasons for the different placement:

  • The target page (code-library.mdx) is already viem v2 throughout, so it wasn't actually outdated. The stale wagmi v1 content was in quickstart.mdx, which docs: update MiniPay quickstart wagmi examples to v2 #2195 updates.
  • The "hide connect button" / auto-connect material overlapped with what the quickstart already covered, so consolidating avoids two places teaching the same thing.

Fixes applied while folding it in: the connector now matches between createConfig and connect() (the original registered bare injected() but connected with injected({ target: "metaMask" })), the imports/chains source are consistent, and a couple of copy-paste leftovers were dropped.

Closing this in favor of #2195 — thanks again for the contribution!

@GigaHierz GigaHierz closed this Jun 16, 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.

2 participants