Skip to content

fix:(cp-30138): skip blockaids validation for gas-included swaps cp-7.77.0#30140

Merged
rarquevaux merged 1 commit into
mainfrom
fix/disable-blockaid-solana-gasless
May 13, 2026
Merged

fix:(cp-30138): skip blockaids validation for gas-included swaps cp-7.77.0#30140
rarquevaux merged 1 commit into
mainfrom
fix/disable-blockaid-solana-gasless

Conversation

@rarquevaux

@rarquevaux rarquevaux commented May 13, 2026

Copy link
Copy Markdown
Contributor

Description

Skip Blockaids validation for gas-included swaps

Changelog

CHANGELOG entry: null

Related issues

Fixes: #30138

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 when Blockaid transaction validation runs for Solana bridge quotes, which could affect security checks if the gasIncluded signal is incorrect. Scope is small and covered by a targeted unit test.

Overview
Updates useBridgeQuoteData to skip Blockaid (validateBridgeTx) validation for Solana/Solana→EVM quotes when the active quote is marked gasIncluded, clearing any prior blockaidError instead.

Adds a unit test ensuring validateBridgeTx is not invoked for gasIncluded Solana quotes and that no Blockaid error is surfaced.

Reviewed by Cursor Bugbot for commit 8db17fe. 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 13, 2026 18:02
@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-transactions Transactions team label May 13, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 d71ed9b. Configure here.

Comment thread app/components/UI/Bridge/hooks/useBridgeQuoteData/index.ts Outdated
@rarquevaux rarquevaux force-pushed the fix/disable-blockaid-solana-gasless branch from d71ed9b to c2738d7 Compare May 13, 2026 18:13
@rarquevaux rarquevaux force-pushed the fix/disable-blockaid-solana-gasless branch from c2738d7 to 8db17fe Compare May 13, 2026 18:14
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR makes a targeted change to useBridgeQuoteData/index.ts: it adds a condition to skip Blockaid validation (validateQuote) for gas-included quotes on Solana (activeQuote?.quote?.gasIncluded === true). This is a narrow, well-scoped change in the Bridge/Swap quote validation logic.

Direct impact: The useBridgeQuoteData hook is consumed by Bridge/Swap components — SwapsConfirmButton, useHasSufficientGas, useRewards, and useBridgeConfirm. The change affects the Blockaid security check path for Solana gas-included quotes, which is relevant to swap/bridge transaction flows.

SmokeSwap is selected as the primary tag because the change is in the Bridge quote data hook that drives swap/bridge flows.

SmokeConfirmations is selected per SmokeSwap's tag description: "when selecting SmokeSwap, also select SmokeConfirmations (transaction confirmations are part of the flow)."

No other tags are warranted — the change does not touch controllers, Engine, navigation, account management, network management, identity, snaps, browser, or any other shared infrastructure. The change is isolated to Bridge/Swap quote validation logic with a corresponding unit test.

Performance Test Selection:
The change is a conditional logic addition in a validation callback (useBridgeQuoteData's validateQuote function). It does not affect rendering performance, data loading, list rendering, animations, or any performance-sensitive path. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 0
Missing keys 15
Type mismatches 0
Value mismatches 9 (informational)

The committed fixture schema is out of date. To update, comment:

@metamaskbot update-mobile-fixture

View full details | Download diff report

@rarquevaux

Copy link
Copy Markdown
Contributor Author

@metamaskbot update-mobile-fixture

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Fixture update started. Running workflow from branch fix/disable-blockaid-solana-gasless. View workflow runs

@github-actions

Copy link
Copy Markdown
Contributor

E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use skip-smart-e2e-selection label\n- iOS build failed — check the CI workflow for errors\n\nView logs and retry

@rarquevaux

Copy link
Copy Markdown
Contributor Author

@metamaskbot update-mobile-fixture

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Fixture update started. Running workflow from branch fix/disable-blockaid-solana-gasless. View workflow runs

@github-actions

Copy link
Copy Markdown
Contributor

E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use skip-smart-e2e-selection label\n- iOS build failed — check the CI workflow for errors\n\nView logs and retry

@rarquevaux rarquevaux added this pull request to the merge queue May 13, 2026
Merged via the queue into main with commit 34d3395 May 13, 2026
111 of 114 checks passed
@rarquevaux rarquevaux deleted the fix/disable-blockaid-solana-gasless branch May 13, 2026 19:28
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 13, 2026
@rarquevaux rarquevaux changed the title fix(cp-30138): skip blockaids validation for gas-included swaps fix:(cp-30138): cp-7.77.0 skip blockaids validation for gas-included swaps May 13, 2026
@rarquevaux rarquevaux changed the title fix:(cp-30138): cp-7.77.0 skip blockaids validation for gas-included swaps fix:(cp-30138): skip blockaids validation for gas-included swaps cp-7.77.0 May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Solana gasless swap blocked by Blockaid validation

2 participants