Skip to content

Release 1095.0.0#9395

Merged
saustrie-consensys merged 3 commits into
mainfrom
release/1095.0.0
Jul 6, 2026
Merged

Release 1095.0.0#9395
saustrie-consensys merged 3 commits into
mainfrom
release/1095.0.0

Conversation

@saustrie-consensys

Copy link
Copy Markdown
Contributor

Explanation

This release branch publishes @metamask/ramps-controller 15.1.0.

The release includes the scope-aware in-app provider widening work from #9353, plus the existing unreleased init() / countries catalog refresh entries from #9261. The release tool also bumped the root monorepo version to 1095.0.0 and updated @metamask/transaction-pay-controller's workspace dependency on @metamask/ramps-controller to ^15.1.0.

This branch was generated by yarn create-release-branch.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • 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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Validation: yarn changelog:validate

Made with Cursor

@metamask-ci

metamask-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown

✅ Changelogs updated and pushed.

@saustrie-consensys saustrie-consensys added this pull request to the merge queue Jul 6, 2026
Merged via the queue into main with commit b5fc903 Jul 6, 2026
413 checks passed
@saustrie-consensys saustrie-consensys deleted the release/1095.0.0 branch July 6, 2026 14:28
pull Bot pushed a commit to Reality2byte/metamask-mobile that referenced this pull request Jul 14, 2026
…v-gated) (MetaMask#32682)

## **Description**

Phase 1 of "Headless Buy: all providers". It widens the MetaMask Pay /
Money Account fiat deposit (the Headless Buy flow) from native-only to
also allow in-app WebView aggregator providers (MoonPay, Banxa,
Mercuryo, Transak, and so on), chosen at the quote layer, behind a
dev/RC-only provider-scope gate. External-browser and custom-action
providers stay filtered out (that is Phase 2). Production is hard-off
(native-only), so this ships behind the gate with no user-facing change.

Uses the released `@metamask/ramps-controller@15.1.0` package from
MetaMask/core#9395, which includes the scope-aware quote widening from
MetaMask/core#9353.

This PR depends on MetaMask#32810 for the extracted headless terminal-error fix.
That split keeps this provider-scope PR below the 1k-line CI limit while
preserving the `failSession` and headless modal teardown coverage in a
smaller prerequisite PR.

### What the plan called for

The original Phase 1 plan had two mobile-facing parts after the core
quote-layer work:

1. Core: scope-aware widening in `RampsController.getQuotes` (core PR
MetaMask#9353, released in `@metamask/ramps-controller@15.1.0`).
2. Mobile: a provider-scope setting, a production hard-off guard,
injecting the scope into `RampsController`, a relaxed fiat-availability
gate, and a dev playground toggle.

The plan assumed all of this stayed inside money-movement code and that
the Money deposit UI and the MetaMask Pay quote path needed no changes.

### What on-device testing added

Testing on a physical device (region set to the UK, scope `in-app`)
surfaced several real issues that this PR also fixes, which is why it
grew past those two parts:

1. The Money "Add funds" button was hidden in aggregator-only regions.
The entry gate was native-only. Fixed by checking whether a provider
actually serves the deposit asset, and by moving that gate into the Ramp
tree so it is money-movement-owned (now `useRegionHasFiatProvider`). The
deposit-asset lookup was pulled into a small Money util and hook.
2. The deposit failed with "No widget URL available for provider".
MetaMask Pay's quote fetch does not pass a `redirectUrl`, so aggregator
quotes came back without the WebView URL. Fixed by having
`RampsController` supply a default redirect URL on the widened path (the
`getDefaultRedirectUrl` option in core MetaMask#9353, wired here). Filed as its
own bug: TRAM-3698.
3. After an error, the screen froze. That terminal-error handling fix
has been extracted to prerequisite PR MetaMask#32810.
4. A separate double-tap on "Add funds" was found. It is a pre-existing
race, tracked as TRAM-3697, and is not fixed here.

### What is included

- `fiatOrders.providerScope` (`off` / `in-app` / `all`),
`getEffectiveProviderScope` (production hard-off), and
`useFiatProviderScope`.
- `RampsController` init injection of `getProviderScope` and
`getDefaultRedirectUrl`.
- Scope-aware availability gates: `useHasNativeFiatProvider`
(confirmation screen) and the relocated, asset-aware
`useRegionHasFiatProvider` (Money deposit entry).
- `useMoneyAccountDepositAssetId` hook and
`getMoneyAccountDepositAssetId` util.
- HeadlessPlayground provider-scope dev toggle.

### Ownership

The widening lives in `RampsController` and the mobile Ramp tree
(money-movement) rather than `TransactionPayController`, so MetaMask
Pay's `getRampsQuote` picks up the chosen in-app quote at `success[0]`
with no Confirmations change.

### Before merge (temporary items to revert)

- Revert the temporary RC HeadlessPlayground gate widening used for
on-device testing.
- Merge prerequisite PR MetaMask#32810 first.

## **Changelog**

<!-- Dev/RC-gated, production hard-off (native-only); not
end-user-facing yet. -->

CHANGELOG entry: null

## **Related issues**

Refs: MetaMask/core#9353
Refs: MetaMask/core#9395
Refs: MetaMask#32810

## **Manual testing steps**

```gherkin
Feature: Headless Buy in-app provider widening (dev/RC only)

  Scenario: in-app aggregator deposit in a supported region
    Given a dev/RC build with the HeadlessPlayground provider scope set to "in-app"
    And the Ramp region is set to United Kingdom (or Brazil) via Ramp Settings > Change region

    When the user opens the Money tab, taps "Add funds", then the debit-card / Apple Pay option
    Then the in-app aggregator WebView (for example Transak, Banxa, or MoonPay) opens to complete the deposit

  Scenario: production is unchanged
    Given a production build (provider scope hard-off)

    When the user runs a Money deposit
    Then only native providers are offered (behaviour identical to before this PR)
```

## **Screenshots/Recordings**

N/A. Dev/RC-gated flow with no production UI change; verified end to end
on iOS RC build 5892 (the in-app aggregator WebView opens in gb/br).

### **Before**

N/A - Regions like Brazil that didn't have Transak Native couldn't make
Money Account purchases

### **After**

We can now use in-app web providers for regions like Brazil.


https://github.com/user-attachments/assets/ef09a626-6fa4-4a0a-82fd-0765bd7c53be




https://github.com/user-attachments/assets/ad64f2a4-4236-4810-8d6e-5c45c88f163e



## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

#### Performance checks (if applicable)

- [ ] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches fiat on-ramp entry gating and quote/redirect behavior for
Money Account deposits; production stays native-only when the flag is
off, but flag-on paths change which providers and regions can deposit.
> 
> **Overview**
> Bumps **`@metamask/ramps-controller`** to **17.0.0** and wires
**Headless Buy “all providers” Phase 1** behind the remote flag
**`moneyHeadlessAllProviders`** (with Settings local overrides via
`useHeadlessAllProvidersEnabled`), aligned with core helpers
`isFiatDepositAvailable` and `regionHasProviderForAsset`.
> 
> **Money “Add funds”** no longer uses native-only
**`useRegionHasNativeFiatProvider`**; it gates debit-card / Apple Pay on
**`useRegionHasFiatProvider(depositAssetId)`**, where the CAIP-19 id
comes from **`useMoneyAccountDepositAssetId`** /
**`getMoneyAccountDepositAssetId`** (vault chain, Monad fallback).
> 
> **`RampsController`** init supplies **`getDefaultRedirectUrl`**
(checkout callback base for MM Pay quotes missing `redirectUrl`) and
delegates **`RemoteFeatureFlagController:getState`** so quote widening
matches UI gates. **`useHasNativeFiatProvider`** delegates to
**`isFiatDepositAvailable`**; redirect config uses
**`isExternalBrowserQuote`**; headless errors use
**`extractExplicitTypedError`** from core.
> 
> Tests cover asset-aware region gating, flag coercion/overrides,
redirect browser classification, and pending-transaction deposit flow
(`waitFor` instead of manual flush).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
8ced12f. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants