Skip to content

chore(deps): ramps-controller preview for MetaMask/core#8251 -> cp-7.71.0#27709

Merged
imyugioh merged 4 commits into
mainfrom
fix/ramps-preview-core-8251
Mar 23, 2026
Merged

chore(deps): ramps-controller preview for MetaMask/core#8251 -> cp-7.71.0#27709
imyugioh merged 4 commits into
mainfrom
fix/ramps-preview-core-8251

Conversation

@imyugioh
Copy link
Copy Markdown
Contributor

@imyugioh imyugioh commented Mar 19, 2026

Description

Integration PR to validate MetaMask/core changes in mobile CI/E2E by resolving @metamask/ramps-controller from a preview npm package (previewBuilds in package.json + updated yarn.lock). No application code changes.

Core PR: MetaMask/core#8251

After core merges and a released version is published, this PR should be updated to remove previewBuilds and bump dependencies to the real version before merge.

Changelog

CHANGELOG entry: null

Related issues

Fixes: N/A (validation / dependency preview only)

Manual testing steps

Feature: ramps-controller preview validation

  Scenario: app resolves preview package
    Given a clean install from this branch
    When the app bundles and runs
    Then @metamask/ramps-controller resolves to the preview version from previewBuilds

  Scenario: ramps flows still work
    Given the app is built from this branch
    When user exercises on-ramp flows that use ramps-controller
    Then no regressions vs main (same UX; underlying package is preview)

Screenshots/Recordings

N/A — dependency-only change.

Pre-merge author checklist

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.

Note

Low Risk
Low risk because this is a dependency source/version switch for @metamask/ramps-controller with no application code changes; main risk is behavior changes introduced by the preview package at runtime.

Overview
Switches @metamask/ramps-controller to a preview build via previewBuilds in package.json and yarn.lock (e.g. @metamask-previews/ramps-controller@12.0.0-preview-434bd0c). Update the preview version string if the bot publishes a newer build for core#8251.


Note

Low Risk
Low risk patch-level dependency update; main risk is any runtime behavior changes in @metamask/ramps-controller affecting ramp flows, plus potential test fixture mismatches if state shape changes again.

Overview
Updates @metamask/ramps-controller from 12.0.0 to 12.0.1 (including lockfile resolution changes).

Aligns the default E2E/unit fixture (default-fixture.json) with the newer RampsController state shape by adding persisted sub-state for countries, providers/payment methods/tokens, native provider (Transak) auth/kyc/user details, requests, and orders.

Written by Cursor Bugbot for commit 0b2fc2f. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Copy Markdown
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.

@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk size-XS labels Mar 19, 2026
@imyugioh imyugioh added team-money-movement issues related to Money Movement features and removed size-XS risk-high Extensive testing required · High bug introduction risk labels Mar 19, 2026
@imyugioh imyugioh self-assigned this Mar 19, 2026
@imyugioh imyugioh force-pushed the fix/ramps-preview-core-8251 branch from f1658ba to ad9d61a Compare March 19, 2026 19:10
@github-actions github-actions Bot added size-XS risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Mar 19, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Mar 19, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​ramps-controller@​12.0.0 ⏵ 12.0.196 +110078 +198 +1100

View full report

github-merge-queue Bot pushed a commit to MetaMask/core that referenced this pull request Mar 19, 2026
…order refresh (#8251)

## Explanation

Fixes a bug where tapping a Transak Native order in "Processing" status
in the Activity tab shows "Something went wrong" (HTTP 400).

Root cause: `RampsService.getOrder` was unconditionally appending the
`wallet` query param to the order URL. When `order.walletAddress` is
`undefined` in Redux state (which can happen for Transak Native
fiat→crypto orders), `URLSearchParams.set('wallet', undefined)` coerces
`undefined` to the string `"undefined"`. The on-ramp API rejects
`wallet=undefined` with a 400 validation error.

Changes:

1. **`RampsService`** — Only append the `wallet` query param when it has
a real value. This is the primary fix: prevents the 400 error when
`walletAddress` is absent from the stored order.

2. **`RampsController`** — When storing a refreshed order, use
`order.walletAddress || wallet` so that if the API response returns the
wallet address (e.g. after the provider maps it correctly), it heals the
previously missing value in Redux state. Falls back to the `wallet`
param if the API response omits it.

## Link to metamask-mobile

link to:
[MetaMask/metamask-mobile/pull/27709](MetaMask/metamask-mobile#27709)

## References

[TRAM-3349](https://consensyssoftware.atlassian.net/browse/TRAM-3349)

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

## Metamask Mobile
No need to change in mobile code.

### Before

<img width="356" height="689" alt="Screenshot 2026-03-18 234503"
src="https://github.com/user-attachments/assets/3da8e2a1-01cb-4c93-99e8-435dfe3111b6"
/>


### After



https://github.com/user-attachments/assets/ece43027-1ada-46a0-813a-dfc912d58000

<img width="366" height="667" alt="Screenshot 2026-03-19 003734"
src="https://github.com/user-attachments/assets/5cbd97e4-1e4a-4035-8594-bf016e3817dd"
/>



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes how order refresh requests are built and how refreshed orders
are persisted/returned; mistakes could break order polling or state
consistency for on-ramp flows.
> 
> **Overview**
> Fixes `getOrder` wallet handling to prevent invalid order refreshes
and keep controller state consistent.
> 
> `RampsService.getOrder` now only appends the `wallet` query param when
it’s non-empty, avoiding `wallet=undefined`/empty-string requests that
can yield 400s. `RampsController.getOrder` now “heals” refreshed orders
by ensuring `walletAddress` (fallback to the passed wallet) and
`providerOrderId` are persisted and returned, so callers and
`RampsController:orderStatusChanged` listeners see consistent data.
> 
> Tests were updated/added to cover missing/empty `walletAddress`
scenarios, to assert the wallet query param is omitted when empty, and
to normalize test mocks via a `createMockProvider` helper; changelog
updated accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
434bd0c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@imyugioh imyugioh force-pushed the fix/ramps-preview-core-8251 branch from 6f6eda5 to 12a0be9 Compare March 23, 2026 13:45
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Mar 23, 2026
@imyugioh imyugioh requested a review from georgeweiler March 23, 2026 13:51
@imyugioh imyugioh changed the title chore(deps): ramps-controller preview for MetaMask/core#8251 chore(deps): ramps-controller preview for MetaMask/core#8251 -> cp-7.71.0 Mar 23, 2026
pkowalski
pkowalski previously approved these changes Mar 23, 2026
@imyugioh imyugioh enabled auto-merge March 23, 2026 16:10
@imyugioh imyugioh requested a review from a team as a code owner March 23, 2026 16:20
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeCard, SmokePerps, SmokeRamps, SmokeMultiChainAPI, SmokePredictions, FlaskBuildTests
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/ramps-controller. Running all tests.

Performance Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/ramps-controller. Running all tests.

View GitHub Actions results

@github-actions github-actions Bot added size-S and removed size-XS labels Mar 23, 2026
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@imyugioh imyugioh requested a review from pkowalski March 23, 2026 17:48
@imyugioh imyugioh added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 4a4f0ae Mar 23, 2026
129 of 164 checks passed
@imyugioh imyugioh deleted the fix/ramps-preview-core-8251 branch March 23, 2026 18:20
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 23, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 risk-high Extensive testing required · High bug introduction risk size-S team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants