fix: release-blocker restore gas estimate alerts cp-7.78.0#30266
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. |
08c4b6f to
bc78256
Compare
bc78256 to
6f5bb10
Compare
| transactionMeta?.chainId && | ||
| isGaslessSupported && | ||
| isGasFeesSponsoredNetworkEnabled(transactionMeta?.chainId), | ||
| ); |
There was a problem hiding this comment.
Missing pending state causes alert flash on sponsored networks
Medium Severity
The new useIsCurrentTransactionGasSponsored hook destructures only isSupported from useIsGaslessSupported(), ignoring its pending state. Both underlying hooks (useGaslessSupportedSmartTransactions and the 7702 relay check) use useAsyncResult for network calls, during which isSupported defaults to false. On gas-sponsored networks, isCurrentTransactionGasSponsored will temporarily be false while async checks resolve, causing useGasEstimateFailedAlert to briefly show the "Inaccurate fee" warning before hiding it — a visible flash. The old code explicitly suppressed alerts during the pending state via isGaslessSupportCheckPending, and a dedicated test for this case was removed.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6f5bb10. Configure here.
There was a problem hiding this comment.
For this specific hook, we want the default value to be false rather than being true, so it doesn't affect "main" (non-sponsored) flows. So it will always be false when pending, instead of true when pending - had to choose one of the two anyways.
6f5bb10 to
d70e0b2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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 0c1926b. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes directly affect the transaction confirmation UI - specifically the alert system shown during EIP-7702 batch transactions and gasless/sponsored transactions. The No other tags are needed as:
Performance Test Selection: |
|
|
@matthewwalsh0 made changes related to your comments ;) |





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, which may include for example calling
pauseon Mainnet USDC and checking that the "gas estimation failed" alert shows at least somewhere (can be second alert, but it needs to exist).Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Changes confirmation alert gating logic for gas estimation failures and sponsorship reserve warnings, which could alter what users see during transaction approval on different networks. Risk is moderate because it affects transaction UX/decisioning but does not change signing or on-chain behavior.
Overview
Restores and tightens when gas-related confirmation alerts are shown by introducing
useIsGasSponsored, which returns true only when both the gasless transaction is supported and the current chain is enabled via thegasFeesSponsoredNetworkfeature flag.useGasEstimateFailedAlertnow suppresses the “gas estimate failed” warning only whenuseIsGasSponsoredis true (instead of suppressing for any gasless-supported/pending checks), anduseGasSponsorshipWarningAlertnow shows the Monad reserve-balance blocking warning only when sponsorship is expected for the transaction. Tests were updated and a new unit test suite was added foruseIsGasSponsored.Reviewed by Cursor Bugbot for commit d06ea89. Bugbot is set up for automated code reviews on this repo. Configure here.