Skip to content

fix(ramps-controller): drop unused headless minimumVersion helper - #9658

Closed
amitabh94 wants to merge 1 commit into
MetaMask:mainfrom
amitabh94:fix/ramps-drop-headless-minimum-version
Closed

fix(ramps-controller): drop unused headless minimumVersion helper#9658
amitabh94 wants to merge 1 commit into
MetaMask:mainfrom
amitabh94:fix/ramps-drop-headless-minimum-version

Conversation

@amitabh94

Copy link
Copy Markdown
Contributor

Summary

  • Remove getHeadlessAllProvidersMinimumVersion from @metamask/ramps-controller.
  • App-version gating for moneyHeadlessAllProviders is already owned by the LaunchDarkly versions wrapper (processed by RemoteFeatureFlagController), matching the live LD shape:
    {
      "versions": {
        "0.0.0": { "enabled": false, "featureVersion": "1" },
        "8.4.0": { "enabled": true, "featureVersion": "1" }
      }
    }
  • Keeps featureVersion fail-closed enablement and providerIds allowlisting unchanged.

Follow-up to #9524. Avoids clients reinventing version gating via payload minimumVersion + validatedVersionGatedFeatureFlag.

Test plan

  • packages/ramps-controller featureFlags.test.ts (46 tests) pass
  • Confirm MetaMask Mobile #33362 no longer imports getHeadlessAllProvidersMinimumVersion (already true on latest PR head)

Made with Cursor

App-version gating for moneyHeadlessAllProviders is owned by the LaunchDarkly
versions wrapper via RemoteFeatureFlagController. Remove
getHeadlessAllProvidersMinimumVersion so clients do not reinvent that gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
@saustrie-consensys
saustrie-consensys added this pull request to the merge queue Jul 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 27, 2026
@saustrie-consensys

Copy link
Copy Markdown
Contributor

Superseded by #9668, which is an identical change from the org repo. Closing this one since the fork PR's CI can't pass merge-queue checks (the merge commit uses the fork's branch content, not the MetaMask/core branch fixes).

pull Bot pushed a commit to dmrazzy/core that referenced this pull request Jul 27, 2026
…taMask#9668)

## Explanation

Removes `getHeadlessAllProvidersMinimumVersion` from
`@metamask/ramps-controller`. App-version gating for
`moneyHeadlessAllProviders` is owned by the LaunchDarkly `versions`
wrapper (processed by `RemoteFeatureFlagController`), not a payload
`minimumVersion` field. `featureVersion` fail-closed enablement and
`providerIds` allowlisting are unchanged.

Supersedes MetaMask#9658 (fork PR with CI issues). Changes are identical; this
PR is from the org repo so the merge-queue CI can resolve the branch
correctly.

## References

* Related to MetaMask#9524

## 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
- [x] 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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Breaking public API removal; consumers importing the helper must
update, though runtime headless enablement and allowlisting behavior in
this package is unchanged.
> 
> **Overview**
> **Breaking:** Drops the exported
`getHeadlessAllProvidersMinimumVersion` helper from
`@metamask/ramps-controller` (implementation, package export, and unit
tests). The unreleased changelog records that **app-version gating** for
`moneyHeadlessAllProviders` is expected to come from the LaunchDarkly
**`versions` wrapper** handled by `RemoteFeatureFlagController`, not
from a `minimumVersion` field on the flag object payload.
> 
> `isHeadlessAllProvidersEnabled`, `getHeadlessProviderAllowlist`, and
`featureVersion` fail-closed behavior are unchanged.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
aa04b15. 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.

2 participants