Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| setError(err instanceof Error ? err.message : "Request failed."); | ||
| } finally { | ||
| setIsLoading(false); | ||
| } |
There was a problem hiding this comment.
Solana demo missing state reset before fetch
Low Severity
SolanaX402FetchDemo's execute callback is missing setData(null) at the start and in the catch block, unlike the equivalent EvmX402FetchDemo which resets data in both places. This means stale response data from a prior successful request will persist visually alongside a new error message on subsequent failures.
packages/modal/src/x402/react.ts
Outdated
| } | ||
|
|
||
| if (chainNamespace === CHAIN_NAMESPACES.EIP155) { | ||
| const provider = web3Auth.connectedConnector?.provider; |
There was a problem hiding this comment.
use fn access. web3auth.connection.ethereumProvider
There was a problem hiding this comment.
or hook completely. hook also gives this
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6e011f7. Configure here.


Motivation and Context
Jira Link: https://consensyssoftware.atlassian.net/browse/EMBED-143?atlOrigin=eyJpIjoiYzYxN2I1NDE1OTQ4NDY0NjhlOGUzMzA4YTc0ZjUzMDMiLCJwIjoiaiJ9
Description
@web3auth/no-modaland exposeuseX402Fetchfrom both theno-modalandmodalReact/Vue entry points.402responses that return payment requirements in the response body.x402-test-server, a wagmi React example, and Vue demo updates for Base Sepolia and Solana network switching.Changes
packages/no-modal/src/base/x402, including helpers to build EVM/Solana payment-aware fetch clients.useX402Fetchhooks for React and Vue in@web3auth/no-modal, then re-export the hook and related types through@web3auth/modal.402responses into thePAYMENT-REQUIREDheader so the underlying@x402/fetchclient can handle servers that return payment requirements in the JSON body.demo/x402-test-server, an Express app with free and paid endpoints like/weather,/premium-data, and/weather-plainfor testing x402 flows against EVM and Solana networks.demo/wagmi-react-appto include anX402demo component, Base Sepolia chain config, and an env var for the x402 test content URL.demo/vue-app-newto expose x402 actions in the dashboard, add Base Sepolia and Solana network switching helpers, and include the required config, translation, and env updates.Test Plan
demo/x402-test-serverwith valid EVM and Solana recipient addresses.useX402Fetchsucceeds fromdemo/wagmi-react-appon Base Sepolia.useX402Fetchsucceeds fromdemo/vue-app-newfor both EVM and Solana wallets./weather-plainreturns a body-based402response that is still handled correctly by the client shim.@web3auth/no-modaland@web3auth/modal.Recordings (if appropriate):
React Hook
Screen.Recording.2026-03-20.at.7.52.48.PM.mov
Vue Composable
Screen.Recording.2026-03-20.at.7.51.42.PM.mov
Types of changes
Checklist:
AI Reviews
x402_auth_2.md
x402_auth_1.md
Note
Medium Risk
Adds new x402 payment flow surfaces in both Vue and wagmi React demos plus a new local payment-enabled Express server; changes touch wallet network switching and paid-request handling, so integration regressions are plausible but scope is demo/test infrastructure.
Overview
Adds end-to-end x402 payment testing across the demo apps, including a new
demo/x402-test-serverExpress backend with free (/health) and paid (/weather,/premium-data) routes plus a debug402body route (/weather-plain).Updates the Vue demo to include a new
X402Testerpanel in the dashboard that can switch to Base Sepolia/Solana Devnet and runuseX402Fetch, routing responses/errors into the shared console; also expands default chain selection and adds Base Sepolia chain config.Updates the wagmi React demo to include an
X402component usinguseX402Fetch, adds Base Sepolia to Web3Auth chain configuration, and introducesVITE_APP_X402_TEST_CONTENT_URLenv samples; also updates deps/lockfiles and ignores.npmrc.Reviewed by Cursor Bugbot for commit 6e011f7. Bugbot is set up for automated code reviews on this repo. Configure here.