Skip to content

feat(STX-532): set gasIncluded to true on solana quote requests#29692

Merged
rarquevaux merged 2 commits into
mainfrom
feat/STX-532-solana-gas-included-mobile
May 7, 2026
Merged

feat(STX-532): set gasIncluded to true on solana quote requests#29692
rarquevaux merged 2 commits into
mainfrom
feat/STX-532-solana-gas-included-mobile

Conversation

@rarquevaux

@rarquevaux rarquevaux commented May 4, 2026

Copy link
Copy Markdown
Contributor

Description

The PR sets gasIncluded to true on Solana quote requests while preserving the fact that the MAX button is not available when SOL is the source token.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

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

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 quote parameter selection for Solana source tokens, which can affect pricing/transaction flow for Solana swaps/bridges. Logic is small and covered by tests, but impacts a core bridging path.

Overview
For Solana source tokens, selectGasIncludedQuoteParams now always returns gasIncluded: true and forces gasIncluded7702: false, regardless of swap/bridge flags or STX/7702 support.

The bridge MAX-button rendering logic (useShouldRenderMaxOption) now explicitly hides MAX for Solana native assets even if gas-included quoting is enabled, and tests were updated/added to cover these Solana-specific behaviors.

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

@rarquevaux rarquevaux requested a review from a team as a code owner May 4, 2026 22:29
@metamaskbotv2 metamaskbotv2 Bot added the team-transactions Transactions team label May 4, 2026
@github-actions

github-actions Bot commented May 4, 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-S label May 4, 2026
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR modifies two Bridge/Swap-related files:

  1. app/selectors/bridge.ts (selectGasIncludedQuoteParams): Adds Solana chain detection so that when the source token is on a Solana chain, gas-included quote params return { gasIncluded: true, gasIncluded7702: false } regardless of STX/7702 flags.

  2. app/components/UI/Bridge/hooks/useShouldRenderMaxOption/index.ts: Adds isSolanaChainId check to prevent the "Max" option from rendering for Solana tokens.

Both changes are targeted at Solana token handling within the Bridge/Swap UI. The other two files are unit tests for these changes.

Tag selection rationale:

  • SmokeSwap: Directly affected - the Bridge/Swap flow is modified to handle Solana source tokens differently (gas-included behavior and Max option rendering).
  • SmokeConfirmations: Required per SmokeSwap tag description ("when selecting SmokeSwap, also select SmokeConfirmations").
  • SmokeNetworkExpansion: Solana-specific behavior is being modified (Solana chain detection in bridge/swap flows), and this tag covers Solana wallet standard compliance and multi-chain provider architecture.

The changes are well-contained within the Bridge/Swap Solana flow and do not affect core navigation, account management, or other unrelated features.

Performance Test Selection:
The changes are limited to a Redux selector (selectGasIncludedQuoteParams) and a React hook (useShouldRenderMaxOption). Both are lightweight computations adding simple conditional checks for Solana chain IDs. There is no impact on rendering performance, list loading, app startup, or any other performance-sensitive areas.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

@rarquevaux rarquevaux added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit d4722b8 May 7, 2026
98 of 100 checks passed
@rarquevaux rarquevaux deleted the feat/STX-532-solana-gas-included-mobile branch May 7, 2026 17:46
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-S team-transactions Transactions team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants