I am experiencing an issue where the wallet address returned by the Web3Auth provider differs from the address retrieved through the Wallet Services Plugin. The project is a slightly modified version of the Web3Auth Plug-and-Play (PnP) Modal SDK Next.js Quick Start Code . Below is a detailed description of the problem:
Setup :
Using Web3Auth Modal with the WalletServicesPlugin.
Chain: Polygon Amoy Testnet.
Code is based on the official Web3Auth PnP Next.js Quick Start, with minor customizations.
Deployed links:
GitLab Repo : Friday Ameh Matthew / Web3auth Nextjs Project · GitLab
App URL : https://web3auth-nextjs-project.vercel.app
Issue :
The wallet address retrieved via the Web3Auth provider returns Address A.
The address fetched using the Wallet Services Plugin returns Address B.
Both addresses are consistent within their respective contexts but differ from each other.
Troubleshooting Attempts :
Verified both the Web3Auth provider and Wallet Services Plugin are configured for the same chain (Polygon Amoy Testnet).
Ensured the Web3Auth provider is initialized only once to maintain a consistent session.
Cleared Web3Auth’s cache, reauthenticated, and rechecked the addresses.
Request for Help :
Is this a known issue or a bug with the Web3Auth infrastructure?
Could there be a configuration mismatch between the provider and the Wallet Services Plugin?
Any debugging tips or insights would be greatly appreciated.
You can find the full source code in the GitLab repository and test the app via the Vercel deployment link provided above.
Looking forward to your suggestions and guidance!