Skip to content

feat: Add useMMPayFiatConfig hook and feature flag selector#27122

Merged
OGPoyraz merged 2 commits into
mainfrom
ogp/27110
Mar 6, 2026
Merged

feat: Add useMMPayFiatConfig hook and feature flag selector#27122
OGPoyraz merged 2 commits into
mainfrom
ogp/27110

Conversation

@OGPoyraz
Copy link
Copy Markdown
Member

@OGPoyraz OGPoyraz commented Mar 6, 2026

Description

  • Add selectMetaMaskPayFiatFlags selector to read the confirmations_pay_fiat LaunchDarkly flag, gating the upcoming fiat payment option in transaction confirmations
  • Add useMMPayFiatConfig hook for React components to consume the flag
  • Flag defaults to disabled - no UI or behavioral changes until downstream tasks wire it in

Changelog

CHANGELOG entry:

Related issues

Fixes: #27110

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

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: adds a new feature-flag selector/hook with a disabled-by-default fallback and unit tests, without changing existing app behavior.

Overview
Adds support for gating upcoming fiat payments in confirmations by introducing a new confirmations_pay_fiat remote flag.

This PR adds selectMetaMaskPayFiatFlags (with PAY_FIAT_ENABLED_DEFAULT = false) plus a small useMMPayFiatConfig React hook to consume it, and includes unit tests covering default/flagged behavior.

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

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Mar 6, 2026
@OGPoyraz OGPoyraz requested a review from a team as a code owner March 6, 2026 11:35
@github-actions github-actions Bot added the size-S label Mar 6, 2026
@OGPoyraz OGPoyraz added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Mar 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes add new feature flag infrastructure for a "Pay Fiat" feature in the confirmations domain:

  1. A new selector selectMetaMaskPayFiatFlags is added to read the confirmations_pay_fiat remote feature flag
  2. A new React hook useMMPayFiatConfig wraps this selector for component use
  3. Both have comprehensive unit tests

Key observations:

  • These are purely additive changes - no existing code is modified
  • The new selector and hook are NOT yet consumed by any other code in the codebase (verified via grep)
  • The feature flag defaults to false (disabled)
  • The changes are in the confirmations hooks/selectors directory

Since the changes are in the confirmations domain and add new feature flag infrastructure that could affect confirmations behavior when enabled in the future, running SmokeConfirmations provides reasonable validation that the confirmations infrastructure still works correctly. However, since nothing currently consumes these new exports, the risk is very low.

Performance Test Selection:
These changes add new feature flag selectors and hooks that are not yet consumed by any components. The changes are purely additive infrastructure code with no impact on UI rendering, data loading, or any user-facing flows. No performance tests are needed.

View GitHub Actions results

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 68
Missing keys 11
Type mismatches 0
Value mismatches 7 (informational)

The committed fixture schema is out of date. To update, comment:

@metamaskbot update-mobile-fixture

View full details | Download diff report

@OGPoyraz OGPoyraz enabled auto-merge March 6, 2026 11:57
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 6, 2026

@OGPoyraz OGPoyraz added this pull request to the merge queue Mar 6, 2026
Merged via the queue into main with commit 14299dd Mar 6, 2026
99 of 100 checks passed
@OGPoyraz OGPoyraz deleted the ogp/27110 branch March 6, 2026 12:42
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 6, 2026
@metamaskbot metamaskbot added the release-7.70.0 Issue or pull request that will be included in release 7.70.0 label Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.70.0 Issue or pull request that will be included in release 7.70.0 size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add feature flag for fiat on-ramp payment

3 participants