Skip to content

feat: gas sponsorship improve alerts and remove gas alert#29835

Merged
maxime-oe merged 1 commit into
mainfrom
feat/gas-sponsorship-remove-gas-alerts
May 14, 2026
Merged

feat: gas sponsorship improve alerts and remove gas alert#29835
maxime-oe merged 1 commit into
mainfrom
feat/gas-sponsorship-remove-gas-alerts

Conversation

@maxime-oe

@maxime-oe maxime-oe commented May 7, 2026

Copy link
Copy Markdown
Contributor

Description

This PR contains two fixes related to Gas Sponsorship alerts:

  • Removes a gas-estimate-related alert for when a transaction will fail in a gasless transaction. Avoids the "double alert" and drops the modal prompting user to change their "gas limit" which doesn't make sense in gasless flows.
  • Changes the copy and severity of the specific 10 MON reserve alert - when a tx would bring the balance of the user below the 10 MON minimum imposed by the Monad network - making sure the user is aware when this condition happens and cannot proceed with the tx - which will always fail in those conditions.

Changelog

CHANGELOG entry: remove gas alerts from confirmation modal in gasless flows
CHANGELOG entry: update copy of 10 MON minimal reserve confirmation alert

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/NEB-951?atlOrigin=eyJpIjoiMDBmNDlhY2E5ZDZiNGQ0NGIwYzNkZGEwMWQ4Y2QxZjYiLCJwIjoiaiJ9

Manual testing steps

Test 1, send MON beyond 10 MON reserve:

On Monad (gas sponsored, but 10 MON reserve limit), try to send:

  • Max MON.
  • Max MON - 1.
  • Max MON - 10.
  • Max MON -9.999

Observe that the 10 MON error message is always displayed first, as opposed as before, and that user cannot proceed with the transaction.

Test 2, removal of network fee warnings:

  1. On Monad or SEI network, open a transaction confirmation for a transaction that will fail - for example call "pause" on USDC (will fail since you are not admin of the token) -> https://monadscan.com/token/0x754704bc059f8c67012fed69bc8a327a5aafb603#writeProxyContract
  2. Observe presence or absence of irrelevant warnings: "Transaction likely to fail" should show up, but not the "Network fee" alert since it is irrelevant in gasless.

Screenshots/Recordings

Before

Failing tx:
Screenshot_2026-05-07-09-20-25-179_io metamask

Send MON beyond 10 MON reserve:
Screenshot_2026-05-07-08-54-43-804_io metamask

After

Failing tx:
Screenshot_2026-05-07-08-39-48-064_io metamask

Send MON beyond 10 MON reserve:

Screenshot_2026-05-07-07-19-05-301_io metamask (note: the grayed "Got it" is already flagged as a general separate issue)

Pre-merge author checklist

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 to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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

Medium Risk
Changes confirmation alert gating and makes the Monad gas sponsorship reserve-balance warning blocking with a buy-flow action, which can affect whether users can proceed with transactions. Risk is limited to the confirmations alert layer but could impact conversion/flow if conditions are misdetected.

Overview
Prevents the GasEstimateFailed warning from showing during gasless/sponsored flows (or while gasless support is still being determined) to avoid redundant/irrelevant gas-limit guidance.

Updates the Monad gas sponsorship reserve-balance alert to be blocking and Danger severity, revises its localized copy/title, and adds a CTA that routes to goToBuy() and rejects the confirmation (skipConfirmation: true). Tests were expanded/updated to cover the new gasless gating and blocking alert behavior.

Reviewed by Cursor Bugbot for commit a423cdb. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented May 7, 2026

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 the size-M label May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes are focused on the confirmation alert system for gas estimation and gas sponsorship warnings:

  1. useGasEstimateFailedAlert.ts: Now suppresses the gas estimate failed alert when gasless support is active or pending. This prevents false-positive warnings during gasless/sponsored transactions. Logic change in alert display conditions.

  2. useGasSponsorshipWarningAlert.ts: Significant behavioral change - the gas sponsorship reserve balance alert is now:

    • Blocking (isBlocking: true, was false)
    • Danger severity (was Warning)
    • Has a "Buy" action button that navigates to the ramp/buy flow and rejects the transaction
    • Uses skipConfirmation: true
      This is a meaningful UX change in the confirmation flow for Monad network transactions.
  3. locales/languages/en.json: Updated alert text for gas sponsorship reserve balance.

These changes directly affect the transaction confirmation UI and alert system. SmokeConfirmations is the appropriate tag as it covers transaction confirmation flows, gas fee customization, and EIP-7702 advanced features including gasless transactions. No other tags are needed since:

  • The changes are isolated to confirmation alert hooks
  • The ramp navigation integration is only triggered as an action callback from within a confirmation alert (not a standalone ramp flow change)
  • No account management, network, swap, or other flows are directly affected

Performance Test Selection:
These changes are limited to alert hook logic within the confirmation flow - they modify when alerts are shown and their severity/blocking state. There are no UI rendering changes, list components, data loading changes, or app initialization changes that would impact performance metrics. No performance tests are warranted.

View GitHub Actions results

@metamaskbotv2 metamaskbotv2 Bot added the team-networks Networks team label May 7, 2026
@maxime-oe maxime-oe marked this pull request as ready for review May 7, 2026 06:07
@maxime-oe maxime-oe requested a review from a team as a code owner May 7, 2026 06:07
@sonarqubecloud

sonarqubecloud Bot commented May 7, 2026

Copy link
Copy Markdown

@maxime-oe maxime-oe added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit ec63474 May 14, 2026
207 of 218 checks passed
@maxime-oe maxime-oe deleted the feat/gas-sponsorship-remove-gas-alerts branch May 14, 2026 16:46
@github-actions github-actions Bot locked and limited conversation to collaborators May 14, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.78.0 Issue or pull request that will be included in release 7.78.0 size-M team-networks Networks team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants