Skip to content

fix: release-blocker restore gas estimate alerts cp-7.78.0#30266

Open
maxime-oe wants to merge 1 commit into
mainfrom
fix/release-blocker-restore-gas-estimate-alerts
Open

fix: release-blocker restore gas estimate alerts cp-7.78.0#30266
maxime-oe wants to merge 1 commit into
mainfrom
fix/release-blocker-restore-gas-estimate-alerts

Conversation

@maxime-oe
Copy link
Copy Markdown
Contributor

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

Description

Fixes release blocker regression #30260 for release 7.78.0

Changelog

CHANGELOG entry: restores gas estimate alerts on all networks except strictly gas-sponsored ones

Related issues

Fixes: #30260

Manual testing steps

Same testing intructions as for #29835
Add non-regression for issues raised in #30260

Screenshots/Recordings

Before

After

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 the conditions for showing the gas estimate failed warning based on a remote feature-flagged sponsored-network map and hardware-wallet detection, which could affect when users see (or miss) an important fee warning.

Overview
Restores the GasEstimateFailed warning logic to be suppressed only when the current chainId is flagged as gas-fee-sponsored, instead of relying on useIsGaslessSupported/pending checks.

The hook now reads transactionMeta to determine chainId and from address, and it explicitly keeps the alert enabled for hardware-wallet accounts even on sponsored networks. Tests were updated to mock the sponsored-network selector and isHardwareAccount, and to cover the sponsored-network and hardware-wallet exception cases.

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

@github-actions
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.

@metamaskbotv2 metamaskbotv2 Bot added the team-networks Networks team label May 15, 2026
@github-actions github-actions Bot added pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-S labels May 15, 2026
@maxime-oe maxime-oe changed the title fix: release-blocker restore gas estimate alerts fix: release-blocker restore gas estimate alerts cp-7.78.0 May 15, 2026
@maxime-oe maxime-oe marked this pull request as ready for review May 15, 2026 16:53
@maxime-oe maxime-oe requested a review from a team as a code owner May 15, 2026 16:53
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 08c4b6f. Configure here.

@maxime-oe maxime-oe force-pushed the fix/release-blocker-restore-gas-estimate-alerts branch from 08c4b6f to bc78256 Compare May 15, 2026 17:08
@maxime-oe maxime-oe removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 15, 2026
@github-actions
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: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are confined to the useGasEstimateFailedAlert hook and its test file within the confirmations hooks/alerts directory. The hook is refactored to replace useIsGaslessSupported with a direct check using getGasFeesSponsoredNetworkEnabled (feature flag selector) and isHardwareAccount utility. The key behavioral change is: hardware wallet users will now see the gas estimate failed alert even on gas-sponsored networks (since hardware wallets cannot use gas sponsorship). This directly affects the transaction confirmation UI alert system. The hook is imported by useConfirmationAlerts.ts, which aggregates all confirmation alerts. SmokeConfirmations is the appropriate tag as it covers transaction confirmation flows including gas fee handling. No other areas (accounts, identity, browser, snaps, swaps, etc.) are affected. No performance impact expected from this alert logic change.

Performance Test Selection:
The changes are limited to a React hook that computes alert state for gas estimation failures. This is a simple boolean computation with no rendering loops, list operations, or data fetching that would impact performance metrics.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Inaccurate fee alert missing

1 participant