Skip to content

fix(ramps): update entry points to use goToBuy#29631

Open
amitabh94 wants to merge 5 commits intomainfrom
fix/tram-3538-goto-buy-entry-points
Open

fix(ramps): update entry points to use goToBuy#29631
amitabh94 wants to merge 5 commits intomainfrom
fix/tram-3538-goto-buy-entry-points

Conversation

@amitabh94
Copy link
Copy Markdown
Contributor

@amitabh94 amitabh94 commented May 1, 2026

Description

Draft scaffold PR for TRAM-3538: update the relevant Ramps entry points to use goToBuy() for add funds card and new order order details flows.

This PR currently contains only an empty scaffold commit so implementation can start from a clean branch based on main.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TRAM-3538

Manual testing steps

Feature: Ramps goToBuy entry points

  Scenario: implementation pending
    Given this PR is currently a draft scaffold
    When implementation is added
    Then manual testing steps should be updated for add funds card and order details entry points

Screenshots/Recordings

Before

N/A - implementation pending.

After

N/A - implementation pending.

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces for production performance metrics

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Made with Cursor


Note

Medium Risk
Changes the card "Fund with cash" entry point from the legacy deposit navigation to unified goToBuy routing, which can alter which ramp flow users land in and affects analytics/tracing emitted on tap.

Overview
Updates the Card add-funds bottom sheet so the cash funding option uses useRampNavigation().goToBuy() (passing a parsed ramp intent derived from the priorityToken) instead of the legacy deposit-specific entry point.

Adjusts analytics/tracing for this entry point: ramp_type now reports BUY/UNIFIED_BUY/UNIFIED_BUY_2 based on unified flags, and the Sentry trace switches from LoadDepositExperience to LoadRampExperience with rampType: BUY tags. Tests are updated to mock unified flags and assert the new navigation + event payloads.

Reviewed by Cursor Bugbot for commit c2d094d. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>
@amitabh94 amitabh94 added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label May 1, 2026
@amitabh94 amitabh94 self-assigned this May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

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.

@metamaskbotv2 metamaskbotv2 Bot added the team-money-movement issues related to Money Movement features label May 1, 2026
Order details "start new order" and card add funds now call goToBuy so
unified buy V2 routes to BuildQuote or TokenSelection instead of legacy
aggregator or forced deposit navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the size-S label May 1, 2026
amitabh94 and others added 3 commits May 1, 2026 15:37
Order details sits on the legacy aggregator order flow; start new order
continues to use goToAggregator.

Co-authored-by: Cursor <cursoragent@cursor.com>
UB2 routes no-asset goToBuy to token selection; drop priority-token
parseRampIntent helper from the card sheet.

Co-authored-by: Cursor <cursoragent@cursor.com>
Map priorityToken address + caipChainId to assetId via parseRampIntent
so UB2 opens BuildQuote for the funded asset when available.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMoney
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are confined to the Card's AddFundsBottomSheet component:

  1. Navigation change: goToDepositgoToBuy with a RampIntent derived from the priority token's CAIP chain ID and address. This changes the routing behavior of the "Fund with cash" button in the Card Add Funds flow.

  2. Analytics update: ramp_type now correctly reflects 'BUY', 'UNIFIED_BUY', or 'UNIFIED_BUY_2' based on feature flags (previously was always 'DEPOSIT' for non-V2 unified).

  3. Trace name update: LoadDepositExperienceLoadRampExperience with RampType.BUY tag.

  4. New hook: useRampsUnifiedV1Enabled added to support the three-way ramp type selection.

The existing E2E test (tests/smoke/card/card-home-add-funds.spec.ts) is tagged with SmokeMoney and tests the Add Funds bottom sheet visibility. The analytics expectations don't check ramp_type specifically, so the test should still pass. However, the navigation change (deposit → buy flow) needs validation to ensure the Card Add Funds flow still works end-to-end.

No SmokeSwap or SmokeConfirmations are needed here since the E2E test only validates the bottom sheet appearance, not the full transaction flow. The changes are unit-tested and the E2E test covers the UI surface adequately with SmokeMoney.

Performance Test Selection:
The changes are limited to navigation routing logic and analytics tracking within the AddFundsBottomSheet component. No UI rendering performance, list rendering, or data loading patterns are affected. No performance tests are warranted.

View GitHub Actions results

@amitabh94 amitabh94 marked this pull request as ready for review May 1, 2026 20:56
@amitabh94 amitabh94 requested a review from a team as a code owner May 1, 2026 20:56
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
72.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant