Skip to content

fix: gasless support check in hook useAutomaticGasFeeTokenSelect#27679

Merged
jpuri merged 2 commits into
mainfrom
gasless_check_fix
Mar 23, 2026
Merged

fix: gasless support check in hook useAutomaticGasFeeTokenSelect#27679
jpuri merged 2 commits into
mainfrom
gasless_check_fix

Conversation

@jpuri
Copy link
Copy Markdown
Contributor

@jpuri jpuri commented Mar 19, 2026

Description

Fix gasless support check in hook useAutomaticGasFeeTokenSelect

Changelog

CHANGELOG entry:

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1047

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

Screenshot 2026-03-19 at 4 18 39 PM

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: a small conditional change in a confirmation hook that only affects when a gas fee token is auto-selected, with no new data flows or security-sensitive logic.

Overview
Fixes useAutomaticGasFeeTokenSelect so it only auto-selects a non-native gas fee token when gasless is actually supported (isSupported from useIsGaslessSupported), instead of triggering based solely on isSmartTransaction/insufficient balance state.

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

@jpuri jpuri requested a review from a team as a code owner March 19, 2026 10:55
@jpuri jpuri added team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Mar 19, 2026
@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.

@jpuri jpuri enabled auto-merge March 19, 2026 10:55
@github-actions github-actions Bot added size-XS risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 19, 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 change modifies useAutomaticGasFeeTokenSelect.ts to add an isGaslessSupported guard condition before automatically selecting a gas fee token. Previously, the hook would auto-select a gas fee token whenever there was insufficient balance and no token was selected. Now it also requires that gasless transactions are actually supported.

This is a focused bug fix in the EIP-7702 / gasless transaction confirmation flow:

  1. The hook is consumed by gas-fee-details-row.tsx in the transaction confirmation UI
  2. The change affects gas fee token auto-selection behavior during transaction confirmations
  3. This is specifically relevant to EIP-7702 advanced account abstraction features (batch transactions, gas fee token payments) mentioned in SmokeConfirmations

SmokeConfirmations is the appropriate tag as it covers gas fee customization, EIP-7702 account abstraction features, and transaction confirmation flows. No other tags are needed since this is a narrow, focused change to a single hook in the confirmations subsystem with no impact on other feature areas (swaps, accounts, networks, etc.).

Performance Test Selection:
This change is a logic fix in a React hook that adds a boolean guard condition. It does not affect rendering performance, data loading, list rendering, or any performance-sensitive code paths. No performance tests are needed.

View GitHub Actions results

@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud
Copy link
Copy Markdown

@jpuri jpuri added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit a6f1e3f Mar 23, 2026
101 checks passed
@jpuri jpuri deleted the gasless_check_fix branch March 23, 2026 16:22
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 23, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 23, 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.72.0 Issue or pull request that will be included in release 7.72.0 risk-medium Moderate testing recommended · Possible bug introduction risk size-XS team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants