GPT-5 finding
Coinbase Pay fallback URL uses unencoded JSON in query parameters, likely breaking the link
- desktop/renderer/src/components/wallet/WalletView.tsx
The code embeds raw JSON (with braces and quotes) directly in a query string. Characters like { }, [ ], and " are not URL-safe and should be percent-encoded. This can result in malformed URLs and failed navigation to Coinbase Pay.
Recommendation
Construct the URL with URLSearchParams and encode JSON properly, e.g.: const params = new URLSearchParams({ addresses: JSON.stringify({ [address]: ["base"] }), assets: JSON.stringify(["USDC"]) }); window.open(`https://pay.coinbase.com/buy?${params.toString()}`, "_blank").