fix: improve UX around gas estimation failing#25955
Conversation
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The The changes are defensive improvements to error handling in the confirmation flow - they don't add new features but improve how the app handles edge cases when gas estimation fails. The risk is medium because while the changes are well-scoped with good unit test coverage, they affect a critical user flow (transaction confirmations) and could potentially impact the user's ability to complete transactions if there are any issues. Performance Test Selection: |
|



Description
Improve handling of scenario when gas estimation fails.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6389
Manual testing steps
Screenshots/Recordings
Screen.Recording.2026-02-10.at.8.12.20.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
UI/UX and hook refactor around gas-estimation failure handling; limited scope with added test coverage, but touches core confirmation fee display logic.
Overview
Improves confirmation UX when gas estimation fails by introducing a shared
useEstimationFailedhook (based onsimulationFails, but ignored forUserFeeLevel.CUSTOM) and wiring it into the confirmations flow.When estimation is failed, the gas fee token selector is disabled (no arrow, modal won’t open) and the gas fee display shows "Unavailable" (new
transactions.unavailablei18n string), while still showing Paid by MetaMask for sponsored fees. Tests were updated/added to cover these behaviors and the updated alert suppression for custom fee level.Written by Cursor Bugbot for commit a6ad6aa. This will update automatically on new commits. Configure here.