Skip to content

Conversation

@lionellbriones
Copy link
Contributor

@lionellbriones lionellbriones commented Jan 21, 2026

Motivation and Context

Jira Link: https://consensyssoftware.atlassian.net/browse/W3APD-5237?atlOrigin=eyJpIjoiN2NmMDcxN2MzZTdlNDhiOWI0MTVkNWJlNDExNTM4MmUiLCJwIjoiaiJ9

Description

Updated wagmi to v3 and fixed deprecated exports
Updated viem and permissionless

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Migrates demo code to wagmi v3 patterns and updates Next.js setup.

  • Update components/Main.tsx (Next.js SSR demo) to wagmi v3: replace useAccount with useConnection, introduce useChains, and switch to mutate/mutateAsync signatures for useSwitchChain, useSignMessage, and useSignTypedData
  • Make app/layout.tsx async and await headers() before cookieToWeb3AuthState for initial Web3Auth state
  • Add ESLint config (eslint.config.mjs) with Next core-web-vitals
  • Refresh next-env.d.ts to include Next route types and updated docs link

Written by Cursor Bugbot for commit ae93ea4. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
web3auth-web Ready Ready Preview, Comment Jan 27, 2026 4:27am

Request Review

"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev --webpack",
Copy link
Contributor Author

@lionellbriones lionellbriones Jan 22, 2026

Choose a reason for hiding this comment

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

nextjs 16 is using turbopack by default which causes issue on the demo

Copy link
Contributor

@arch1995 arch1995 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

const { signMessageAsync, data: signedMessageData } = useSignMessage();
const { address, isConnected: isWagmiConnected } = useAccount();
const { mutateAsync: signMessageAsync, data: signedMessageData } = useSignMessage();
const { address, isConnected: isWagmiConnected } = useConnection();
Copy link

Choose a reason for hiding this comment

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

Wrong hook used for account address and connection status

Medium Severity

The migration from useAccount to useConnection may be incorrect. According to wagmi documentation, useAccount is the hook for getting account information including address and isConnected. The useConnection hook has a different purpose and return type. The Vue demo uses { status, address } from useConnection (with status, not isConnected), suggesting the React code's attempt to destructure isConnected from useConnection may not work correctly, potentially causing the wagmi connection status to always appear disconnected.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

3 participants