feat(stellar): improve Stellar wallet UX#58
Conversation
- Always show Freighter and LOBSTR in wallet list (even without extension) - When extension not installed, route through WalletConnect - Add WalletConnect QR page for desktop without extension - Add modal close detection to WalletConnect (rejects on user dismiss) - Update description text for WalletConnect flow - Pre-fetch supported wallets in StellarContextProvider (no loading spinner) - Cache kit singleton synchronously to avoid flash
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 458b0636d3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Remove dead StellarWalletConnectQR component (unreachable route, signing bug) - Fix MutationObserver leak in walletconnect.module.ts (add finally block) - Add walletsLoaded flag to StellarContextProvider (fix infinite spinner on error) - Collapse duplicate isPlatformWrapper/else branches in ConnectStellar - Use WALLET_CONNECT_ID constant in ConnectorStellar (no hardcoded string) - Check hasWalletConnect before routing to WalletConnect (custom kit safety)
- Auto-detect Stellar→Stellar USDC/EURC same-chain payments - Force intent: stellar_direct when source=destination chain+token - Add settlementMode field to PaymentResponse - Pass intent as top-level field in POST /payments - Handle settlementMode in PayWithStellarToken (direct send) - Add modal close detection to WalletConnect (MutationObserver) - Update workspace deps for local dev mode
Review — no P0, mergeable; 2 P1s worth a look firstReviewed the signing / fund-routing path closely. No blocker. The P1 — recommend before merge
P2 (non-blocking)
Verdict: mergeable. Fund-safety path verified clean. The multi-account |
Summary
Improve Stellar wallet UX and add Direct Settlement support.
Stellar Wallet UX
Stellar Direct Settlement
Auto-detects same-chain Stellar USDC/EURC payments and routes directly:
intent: "stellar_direct"intentsent as top-level field in POST /payments (separate from displaytitle)settlementMode: "stellar_direct"→ source IS destination, fee "0.00", direct sendintenttoCreateNewPaymentParams/CreatePaymentRequest,settlementModetoPaymentResponseFiles Changed
packages/pay-common/src/api/types.ts— Addedintent+settlementModefieldspackages/pay-common/src/api/payment.ts— Passintentto API requestpackages/connectkit/src/payment/createPaymentPayload.ts— Auto-detect stellar_direct, pass intentpackages/connectkit/src/components/Pages/Stellar/PayWithStellarToken/index.tsx— Handle settlementMode responsepackages/connectkit/src/provider/StellarContextProvider.tsx— Pre-fetch wallets, sync kit cachepackages/connectkit/src/utils/stellar/walletconnect.module.ts— Modal close detectionpackages/connectkit/src/components/Pages/Stellar/ConnectStellar/index.tsx— Always show wallets, no spinnerpackages/connectkit/src/components/Pages/Stellar/ConnectorStellar/index.tsx— Use WALLET_CONNECT_ID constantpackages/connectkit/src/components/RozoPayModal/index.tsx— Register routespackages/connectkit/src/constants/routes.ts— Route definitionsexamples/nextjs-app/package.json— workspace:* for local devpackages/connectkit/package.json— workspace:* for local devTesting
Wallet UX:
Direct Settlement: