Skip to content

chore: remove available balance and swap toggle from QuickBuy amount section#30957

Merged
zone-live merged 2 commits into
mainfrom
TSA-quickbuy-remove-ui-elements-not-needed
Jun 3, 2026
Merged

chore: remove available balance and swap toggle from QuickBuy amount section#30957
zone-live merged 2 commits into
mainfrom
TSA-quickbuy-remove-ui-elements-not-needed

Conversation

@zone-live

@zone-live zone-live commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description

Removes two UI elements, available balance & swap arrows from the QuickBuy bottom sheet amount area.

Before:
Simulator Screenshot - iPhone 17 Pro - 2026-06-02 at 20 05 42

After:
Simulator Screenshot - iPhone 17 Pro - 2026-06-02 at 20 12 34

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

Low Risk
Presentation-only changes in the Social Leaderboard Quick Buy sheet; trade logic and amount display modes are unchanged aside from removing two UI affordances.

Overview
Strips the Quick Buy bottom-sheet amount header down to primary/secondary amounts and the hidden input: the available balance line and the fiat/crypto swap control are removed from QuickBuyAmountSection, along with their props and wiring from QuickBuyAmount.

Tests are updated to assert the toggle and “available” copy never appear, replacing cases that covered toggle visibility and balance formatting.

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

@github-actions

github-actions Bot commented Jun 2, 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.

@mm-token-exchange-service mm-token-exchange-service Bot added the team-social-ai Social & AI team label Jun 2, 2026
@github-actions github-actions Bot added size-M risk:low AI analysis: low risk labels Jun 2, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.78%. Comparing base (716c344) to head (41ffe69).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #30957   +/-   ##
=======================================
  Coverage   82.77%   82.78%           
=======================================
  Files        5584     5585    +1     
  Lines      144075   144107   +32     
  Branches    33332    33347   +15     
=======================================
+ Hits       119254   119293   +39     
+ Misses      16874    16863   -11     
- Partials     7947     7951    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

xavier-brochard
xavier-brochard previously approved these changes Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The three changed files are all within the SocialLeaderboard/TraderPositionView/QuickBuy feature area. The changes are purely UI simplifications:

  1. QuickBuyAmount.tsx: Removes features, sourceBalanceFiat, and handleToggleAmountDisplay from context usage, and removes the availableBalance computation logic.
  2. QuickBuyAmountSection.tsx: Removes the fiat/crypto toggle button (SwapVertical icon + TouchableOpacity), the available balance text display, and the related props (fiatCryptoToggleEnabled, availableBalanceFiat, onToggleAmountDisplay). Simplifies secondary label rendering from a Box+Text+conditional-toggle to just a Text element.
  3. QuickBuyAmountSection.test.tsx: Updates unit tests to match the removed features.

No E2E tests exist for SocialLeaderboard, TraderPositionView, or QuickBuy flows — confirmed by searching for these patterns in .spec.ts and .e2e.ts files. The changes are isolated to a niche trading feature with no impact on:

  • Core wallet functionality (Engine, controllers)
  • Navigation or shared components (TabBar, modals, confirmations)
  • Any other feature areas (swaps, accounts, networks, etc.)

The unit tests are updated to cover the new behavior. No E2E tags are warranted.

Performance Test Selection:
The changes remove UI elements (toggle button and available balance text) from the QuickBuy amount section. These are minor UI simplifications with no impact on rendering performance, data loading, state management, or any performance-sensitive code paths. No performance tests are needed.

View GitHub Actions results

@zone-live zone-live requested a review from xavier-brochard June 3, 2026 12:24
@zone-live zone-live enabled auto-merge June 3, 2026 12:24
@zone-live zone-live added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit a6d6b33 Jun 3, 2026
155 of 156 checks passed
@zone-live zone-live deleted the TSA-quickbuy-remove-ui-elements-not-needed branch June 3, 2026 12:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.81.0 Issue or pull request that will be included in release 7.81.0 label Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.81.0 Issue or pull request that will be included in release 7.81.0 risk:low AI analysis: low risk size-M team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants