feat: implements websocks subscription for native ramps orders#26734
feat: implements websocks subscription for native ramps orders#26734georgeweiler wants to merge 37 commits intomainfrom
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
|
app/core/Engine/controllers/ramps-controller/ramps-controller-init.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
app/core/Engine/controllers/ramps-controller/ramps-controller-init.ts
Outdated
Show resolved
Hide resolved
…transak-websockets
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26734 +/- ##
==========================================
+ Coverage 82.63% 82.66% +0.02%
==========================================
Files 4854 4866 +12
Lines 125092 125777 +685
Branches 27919 28160 +241
==========================================
+ Hits 103376 103970 +594
- Misses 14600 14638 +38
- Partials 7116 7169 +53 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The committed fixture schema is out of date. To update, comment: |



Description
Adds mobile support for Transak order WebSocket subscriptions in the native ramps flow.
https://docs.transak.com/api/public/get-webhooks
This PR wires the mobile app up to the new websocket support added in
@metamask/ramps-controller, so Transak orders can receive real-time status nudges from Transak via Pusher. The mobile client now passes a React Native Pusher implementation intoTransakService, delegates the new websocket messenger actions/events, and includes the required dependency.This keeps the existing polling path in place as a fallback, while allowing the controller to react faster when Transak emits an order update event.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Related core PR: MetaMask/core#8075
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Introduces a new real-time WebSocket path for Transak order updates (via Pusher) and new messenger actions/events, which can affect order status handling and background connectivity; polling remains as a fallback but integration issues could impact order tracking.
Overview
Enables native ramps (Transak) to receive real-time order status updates by wiring a React Native
pusher-jsimplementation intoTransakServiceand delegating new WebSocket-related messenger actions/events (includingTransakService:orderUpdate).Updates ramps initialization to call
subscribeToTransakOrderUpdates()once (guarded across repeated remote-flag state changes), swallow subscription failures, and always startstartOrderPolling()as a fallback; adds/updates unit tests and Jest mocks accordingly, plus bumps@metamask/ramps-controllerand adds thepusher-jsdependency.Written by Cursor Bugbot for commit f73419d. This will update automatically on new commits. Configure here.