Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The changes modify core ramp flow screens (BuildQuote, Checkout) and add new routing logic. While the headless flow is additive, the modifications to existing screens (BuildQuote auto-continue logic, Checkout order tracking) could affect the standard ramp buy flow. SmokeRamps tests cover the fiat on-ramp/off-ramp features including the buy flow, amount input, and checkout screens that are directly modified here. No other feature areas are affected - there are no changes to navigation infrastructure, shared controllers, or components used by other test suites. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| }: UseHeadlessRampsParams = {}): UseHeadlessRampsResult { | ||
| const navigation = useNavigation(); | ||
| const [order, setOrder] = useState<RampsOrder | null>(null); | ||
| const sessionIdRef = useRef<string>(registerHeadlessBuySession()); |
There was a problem hiding this comment.
Memory leak from useRef calling side-effect every render
Medium Severity
useRef(registerHeadlessBuySession()) calls registerHeadlessBuySession() on every render in React 18, since useRef evaluates its argument each time but only uses the result on the first render. Each call adds a new entry to the module-level headlessBuySessions Map, but only the first session (in sessionIdRef.current) is ever cleaned up via unregisterHeadlessBuySession on unmount. All subsequent sessions leak permanently in the global Map.
|
✅ E2E Fixture Validation — Schema is up to date |
|




Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new headless buy entrypoint that auto-continues the Ramp flow and threads a session ID through checkout/native-provider routing; mistakes could cause unintended navigation/auto-purchases or missed order tracking.
Overview
Adds a headless buy capability that reuses the existing Ramp buy orchestration without rendering the full
BuildQuoteUI.Introduces
useHeadlessRampsplus aheadlessBuySessionRegistryto create per-session IDs, track order IDs, and listen toRampsController:orderStatusChangedevents only for orders initiated by that headless session.Threads
headlessSessionIdthroughBuildQuote,Checkout, and Transak native flow screens/routing, and records order IDs (precreated and callback-derived) viatrackHeadlessBuyOrderso headless callers can observe completion/failure;BuildQuotealso supports an auto-continue mode with a minimal loading/error+retry UI.Written by Cursor Bugbot for commit 3608450. This will update automatically on new commits. Configure here.