chore(wallet): remove pay proxy, use API directly#1009
Open
ganchoradkov wants to merge 5 commits intomainfrom
Open
chore(wallet): remove pay proxy, use API directly#1009ganchoradkov wants to merge 5 commits intomainfrom
ganchoradkov wants to merge 5 commits intomainfrom
Conversation
The Pay API now supports direct requests without a proxy. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
Contributor
There was a problem hiding this comment.
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
createWalletKitto readNEXT_PUBLIC_PAY_API_BASE_URLinstead 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
Made-with: Cursor
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/pay/[...path]) that forwarded requests to the Pay API, since the API now supports direct requests without a proxyWalletConnectUtil.tsto useNEXT_PUBLIC_PAY_API_BASE_URLenv var directly instead of routing through the local proxyTest plan
NEXT_PUBLIC_PAY_API_BASE_URLoverride works when setMade with Cursor