Skip to content

chore(wallet): remove pay proxy, use API directly#1009

Open
ganchoradkov wants to merge 5 commits intomainfrom
chore/wallet-remove-pay-proxy
Open

chore(wallet): remove pay proxy, use API directly#1009
ganchoradkov wants to merge 5 commits intomainfrom
chore/wallet-remove-pay-proxy

Conversation

@ganchoradkov
Copy link
Copy Markdown
Member

Summary

  • Remove the Next.js API route proxy (/api/pay/[...path]) that forwarded requests to the Pay API, since the API now supports direct requests without a proxy
  • Update WalletConnectUtil.ts to use NEXT_PUBLIC_PAY_API_BASE_URL env var directly instead of routing through the local proxy

Test plan

  • Verify pay flow works end-to-end without the proxy
  • Confirm NEXT_PUBLIC_PAY_API_BASE_URL override works when set
  • Confirm default API URL is used when env var is not set

Made with Cursor

The Pay API now supports direct requests without a proxy.

Made-with: Cursor
Copilot AI review requested due to automatic review settings March 18, 2026 19:11
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 18, 2026

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

Project Deployment Actions Updated (UTC)
decentralized-relay-wallet Ready Ready Preview, Comment Mar 18, 2026 9:52pm
pos-dapp Ready Ready Preview, Comment Mar 18, 2026 9:52pm
react-wallet-v2 Ready Ready Preview, Comment Mar 18, 2026 9:52pm
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
appkit-react-wagmi-example Ignored Ignored Mar 18, 2026 9:52pm
appkit-solana Ignored Ignored Mar 18, 2026 9:52pm
chain-abstraction-demo Ignored Ignored Preview Mar 18, 2026 9:52pm
malicious-dapp-verify-simulation Ignored Ignored Preview Mar 18, 2026 9:52pm
react-dapp-v2 Ignored Ignored Preview Mar 18, 2026 9:52pm
smart-sessions-demo Ignored Ignored Preview Mar 18, 2026 9:52pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the local Next.js Pay API proxy route and updates the WalletConnect Pay integration to call the Pay API directly, with an intended optional override via NEXT_PUBLIC_PAY_API_BASE_URL.

Changes:

  • Removed the Next.js API route proxy at /api/pay/[...path].
  • Updated createWalletKit to read NEXT_PUBLIC_PAY_API_BASE_URL instead of routing through the local proxy.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
advanced/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts Switches Pay base URL configuration source and adjusts WalletKit initialization.
advanced/wallets/react-wallet-v2/src/pages/api/pay/[...path].ts Deletes the Pay API proxy route implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +37
@@ -34,15 +32,17 @@ export async function createWalletKit(relayerRegionURL: string) {
signConfig: {
disableRequestQueue: true
},
...(apiKey ? {
payConfig: {
appId: process.env.NEXT_PUBLIC_PROJECT_ID,
apiKey,
baseUrl,
}
} : {})
payConfig: {
appId: process.env.NEXT_PUBLIC_PROJECT_ID
}
Comment on lines 39 to 45
console.log('pay', {
payConfig: {
appId: process.env.NEXT_PUBLIC_PROJECT_ID,
apiKey,
...(baseUrl ? { baseUrl } : {})
}
})
Update payConfig to always include appId and apiKey, add
NEXT_PUBLIC_PAY_API_BASE_URL to env example, and apply formatting fixes.

Made-with: Cursor
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