Skip to content

refactor: migrate renderBottomContent into independent component#27334

Merged
GeorgeGkas merged 4 commits into
mainfrom
swaps-4101
Mar 16, 2026
Merged

refactor: migrate renderBottomContent into independent component#27334
GeorgeGkas merged 4 commits into
mainfrom
swaps-4101

Conversation

@GeorgeGkas

@GeorgeGkas GeorgeGkas commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Description

migrate renderBottomContent into independent component

Changelog

CHANGELOG entry: N/A

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-4101

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

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 refactor that moves existing footer rendering logic into a new component and adds targeted tests; main risk is minor UI regression in when the confirm button/banners/disclaimer render.

Overview
Extracts BridgeView’s inline renderBottomContent into a new BridgeViewFooter component and wires it into BridgeView, removing the duplicated footer logic and related imports.

Adds a dedicated BridgeViewFooter.test.tsx covering render gating (loading/no quote/missing amount), hardware-wallet Solana banner, Blockaid alert banner, fee/no-fee disclaimer, and approval disclaimer/tooltip, while deleting the corresponding footer-specific tests from BridgeView.test.tsx.

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

@GeorgeGkas GeorgeGkas requested a review from a team as a code owner March 11, 2026 10:34
@GeorgeGkas GeorgeGkas added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Mar 11, 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.

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Mar 11, 2026
Comment thread app/components/UI/Bridge/Views/BridgeView/BridgeViewFooter.tsx
Comment thread app/components/UI/Bridge/Views/BridgeView/BridgeViewFooter.test.tsx
infiniteflower
infiniteflower previously approved these changes Mar 11, 2026
bfullam
bfullam previously approved these changes Mar 11, 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.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread app/components/UI/Bridge/Views/BridgeView/BridgeViewFooter.tsx
@GeorgeGkas GeorgeGkas dismissed stale reviews from infiniteflower and bfullam via 8721336 March 15, 2026 22:50
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR refactors the BridgeView by extracting the entire bottom section (confirm button, fee disclaimer, approval tooltip, hardware/Solana banner, Blockaid error banner) into a new BridgeViewFooter component. Although primarily a UI refactor, this section is critical to the bridge execution flow:

  • Contains SwapsConfirmButton (transaction initiation)
  • Displays approval requirement text and ApprovalTooltip
  • Shows Blockaid security errors
  • Handles hardware wallet + Solana restriction banner
  • Uses bridge controller state (quotesLastFetched) and quote fee data

Any regression here could break the bridge execution path or prevent users from confirming transactions.

Bridge is part of the Trade flows (SmokeTrade), and per tag rules, when selecting SmokeTrade for swap/bridge flows, SmokeConfirmations must also be selected because confirmations are part of the transaction flow.

No controller logic or core Engine changes were introduced—this is a component extraction with equivalent logic—so broad wallet, identity, network, or multi-chain test suites are not required.

Therefore:

  • SmokeTrade → validates bridge flow entry, quote handling, and execution
  • SmokeConfirmations → validates transaction confirmation behavior triggered from bridge

No additional tags (e.g., SmokeWalletPlatform, SmokeNetworkExpansion, SmokeMultiChainAPI) are required because this change does not affect Trending, session permissions, or provider architecture.

Performance Test Selection:
This change is a structural UI refactor (component extraction) without added heavy computation, new hooks with expensive logic, list rendering changes, or controller/state management changes. It does not impact app launch, onboarding, login, asset loading, swaps performance, or predictive/perps flows in a measurable way. Therefore, no performance tests are required.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

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

@sonarqubecloud

Copy link
Copy Markdown

@GeorgeGkas GeorgeGkas added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 97675c9 Mar 16, 2026
169 of 171 checks passed
@GeorgeGkas GeorgeGkas deleted the swaps-4101 branch March 16, 2026 09:18
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 16, 2026
@metamaskbot metamaskbot added the release-7.71.0 Issue or pull request that will be included in release 7.71.0 label Mar 16, 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.71.0 Issue or pull request that will be included in release 7.71.0 size-L team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants