Skip to content

Conversation

@gambinish
Copy link
Contributor

@gambinish gambinish commented Nov 6, 2025

Description

The back arrow in PerpsHomeScreen was using navigation.goBack(), which would work correctly when navigating from Main wallet view → Perps Home → Main wallet view

But when entering PerpsHomeScreen from another entry point, such as PerpsOnboarding, it would create a loop when navigating from Perps Tutorial → Perps Home (back arrow would return to tutorial)

This PR fixes this by changing this to navigateToWallet which explicitly navigates to the wallet home screen as expected

Changelog

CHANGELOG entry: Fix navigation loop from PerpsHomeScreen

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-1984

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

PerpsHomeView back arrow now always navigates to wallet home; tests updated to assert wallet navigation.

  • UI/Perps:
    • PerpsHomeView.tsx: Change back handler from navigateBack to navigateToWallet to avoid navigation loops; keep search navigation via navigateToMarketList.
  • Tests:
    • PerpsHomeView.test.tsx: Update mocks and expectations to use navigateToWallet for back action; clear relevant mocks; retain existing behavior checks for sections and actions.

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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.

@gambinish gambinish marked this pull request as ready for review November 6, 2025 23:15
@gambinish gambinish requested a review from a team as a code owner November 6, 2025 23:15
@github-actions github-actions bot added the size-S label Nov 6, 2025
@gambinish gambinish added team-perps Perps team and removed team-earn labels Nov 6, 2025
@gambinish gambinish enabled auto-merge November 7, 2025 16:36
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

@gambinish gambinish added this pull request to the merge queue Nov 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2025
@gambinish gambinish added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit e30bced Nov 7, 2025
85 checks passed
@gambinish gambinish deleted the perps/tat-1984-perps-home-back-arrow branch November 7, 2025 17:43
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.60.0 Issue or pull request that will be included in release 7.60.0 size-S team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants