Release 1095.0.0#9395
Merged
Merged
Conversation
|
✅ Changelogs updated and pushed. |
wenfix
approved these changes
Jul 6, 2026
OGPoyraz
approved these changes
Jul 6, 2026
10 tasks
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 -->
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
This release branch publishes
@metamask/ramps-controller15.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 to1095.0.0and updated@metamask/transaction-pay-controller's workspace dependency on@metamask/ramps-controllerto^15.1.0.This branch was generated by
yarn create-release-branch.References
Checklist
Validation:
yarn changelog:validateMade with Cursor