fix(ramps): UB2 orderType analytics, callback purchase metrics, always-on UB2#29628
Closed
fix(ramps): UB2 orderType analytics, callback purchase metrics, always-on UB2#29628
Conversation
Install preview build via npm alias so imports stay @metamask/ramps-controller. Related: MetaMask/core#8574 (dev ramps API). Made-with: Cursor
- Views/Checkout: reset to RampsOrderDetails with callbackUrl + provider params instead of awaiting getOrderFromCallback in the WebView sheet. - useTransakRouting: same pattern for Transak payment webview redirects (delegate fetch to OrderDetails). - OrderDetails: show V2 order toast after callback fetch; optional cryptocurrency route param for toast fallback; status metrics on callback resolution. - rampsNavigation: document optional cryptocurrency on order details params. Tests: Checkout, OrderDetails, useTransakRouting. Co-authored-by: Cursor <cursoragent@cursor.com>
…s-on UB2 - TRAM-3534: normalize V2 orderType (buy/BUY) for on-ramp vs off-ramp events - Reuse handleOrderStatusChangedForMetrics after WebView callback addOrder - OFFRAMP_PURCHASE_FAILED typed as OffRampPurchaseFailed in Aggregator analytics - Remove unified buy v1/v2 feature-flag selectors and gate UB2 in UI/tests Refs: https://consensyssoftware.atlassian.net/browse/TRAM-3534 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
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. |
Contributor
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
10 tasks
|
Contributor
Author
|
Closing: superseded by analytics-only draft #29629 (this PR mixed unrelated UB2 / flag / navigation changes). |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
orderTypefrom the V2 API/controller stub is not exactlyBUY(e.g. lowercasebuy). Normalizes order type for FiatOrder mapping and uses consistent buy/sell detection in controller +getRampsV2AnalyticsPayload.OFFRAMP_PURCHASE_FAILEDpayload type corrected toOffRampPurchaseFailed.OrderDetailscalls existinghandleOrderStatusChangedForMetricswhen the merged order status changes (reusesONRAMP_PURCHASE_COMPLETED/ failed / cancelled analytics instead of bespoke checkout events).Jira
https://consensyssoftware.atlassian.net/browse/TRAM-3534
Testing
Focused Jest (examples run locally):
Risk
Analytics and navigation/FF surface area is large; reviewers should confirm UB2 “always on” matches product intent for this branch.