Skip to content

fix(earn): prevent swipe gesture conflict in earn screen stack navigator cp-7.73.0#28836

Merged
tommasini merged 1 commit intomainfrom
fix/quick-convert-button-swipe
Apr 15, 2026
Merged

fix(earn): prevent swipe gesture conflict in earn screen stack navigator cp-7.73.0#28836
tommasini merged 1 commit intomainfrom
fix/quick-convert-button-swipe

Conversation

@tommasini
Copy link
Copy Markdown
Contributor

@tommasini tommasini commented Apr 14, 2026


Description

The EarnScreenStack navigator was using the default stack presentation mode, which enables a swipe-back gesture on the entire screen. This conflicted with swipe interactions inside the MusdQuickConvertView (the quick convert button), causing the screen to dismiss unintentionally when users tried to swipe within the view.

The fix adds screenOptions={{ presentation: 'transparentModal' }} to the EarnScreenStack navigator, which disables the swipe-to-dismiss gesture at the navigator level. This is consistent with how the EarnModalStack is already configured.

Changelog

CHANGELOG entry: Fixed swipe gesture conflict that caused the earn quick convert screen to dismiss unintentionally

Related issues

Fixes:

Manual testing steps

Feature: Earn mUSD quick convert swipe interaction

  Background:
    Given I am logged into MetaMask Mobile
    And I have mUSD in my earn portfolio

  Scenario: user swipes on the quick convert button without dismissing the screen
    Given I am on the mUSD quick convert screen

    When user swipes left or right on the quick convert input or button
    Then the screen should remain open
    And the swipe interaction should be handled by the component correctly

  Scenario: user navigates back from the earn screen using the back button
    Given I am on any earn screen (deposit confirmation, withdrawal confirmation, or quick convert)

    When user taps the back button or header back navigation
    Then I should be navigated back to the previous screen
    And the screen should not dismiss via swipe gesture

Screenshots/Recordings

Before

https://github.com/user-attachments/assets/8e1142bc-2958-408d-841a-91fb9fb1a0e4
N/A

After

Screen.Recording.2026-04-14.at.22.28.36.mov

N/A

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.

Made with Cursor


Note

Low Risk
Low risk UI navigation config change; it only adjusts stack presentation/gestures and may subtly affect transition/overlay behavior for Earn screens.

Overview
Updates EarnScreenStack to use screenOptions={{ presentation: 'transparentModal' }}, preventing the default swipe-back gesture from conflicting with swipe interactions (e.g., in MusdQuickConvertView) and aligning its behavior with the existing modal stack configuration.

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

@tommasini tommasini self-assigned this Apr 14, 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-mobile-platform Mobile Platform team label Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@github-project-automation github-project-automation Bot moved this to Needs dev review in PR review queue Apr 14, 2026
@tommasini tommasini changed the title fix(earn): prevent swipe gesture conflict in earn screen stack navigator fix(earn): prevent swipe gesture conflict in earn screen stack navigator cp-7.73.0 Apr 14, 2026
@tommasini tommasini marked this pull request as ready for review April 14, 2026 20:50
@tommasini tommasini requested a review from a team as a code owner April 14, 2026 20:50
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 738ece4. Configure here.

Comment thread app/components/UI/Earn/routes/index.tsx
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

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

@tommasini tommasini enabled auto-merge April 14, 2026 21:00
@tommasini tommasini disabled auto-merge April 15, 2026 08:21
@github-project-automation github-project-automation Bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Apr 15, 2026
@tommasini tommasini added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit 7c48d5b Apr 15, 2026
145 checks passed
@tommasini tommasini deleted the fix/quick-convert-button-swipe branch April 15, 2026 14:47
@github-project-automation github-project-automation Bot moved this from Review finalised - Ready to be merged to Merged, Closed or Archived in PR review queue Apr 15, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 15, 2026
@metamaskbot metamaskbot added the release-7.74.0 Issue or pull request that will be included in release 7.74.0 label Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.74.0 Issue or pull request that will be included in release 7.74.0 size-XS team-mobile-platform Mobile Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants