Skip to content

chore(runway): cherry-pick fix(perps): route deposit flow to redesigned confirmations with perps header#27231

Merged
chloeYue merged 3 commits into
release/7.69.0from
cherry-pick-7-69-0-9975c8c
Mar 10, 2026
Merged

chore(runway): cherry-pick fix(perps): route deposit flow to redesigned confirmations with perps header#27231
chloeYue merged 3 commits into
release/7.69.0from
cherry-pick-7-69-0-9975c8c

Conversation

@runway-github

@runway-github runway-github Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Description

The perps deposit flow was using navigateToConfirmation({ stack: Routes.PERPS.ROOT }), which did not correctly route users to the
redesigned confirmations screen after initiating a deposit. Users could
end up on the wrong confirmation stack or without the perps-specific
header.

This change updates the flow so that when the user taps the Perps
balance token to deposit:

  1. The current approval/confirmation is dismissed via handleReject()
    from useApprovalRequest.
  2. depositWithConfirmation() runs to start the deposit flow.
  3. On success, navigation goes to REDESIGNED_CONFIRMATIONS with
    showPerpsHeader: true instead of the previous PERPS.ROOT stack.

Dependencies on useConfirmNavigation are removed in favor of
useNavigation and useApprovalRequest so the deposit action and
post-deposit navigation are explicit and aligned with the redesigned
confirmations screen.

Changelog

CHANGELOG entry: Fixed perps deposit flow so it routes to the redesigned
confirmations screen with the perps header after a successful deposit.

Related issues

Fixes:
https://consensys.slack.com/archives/C092T3GPHQD/p1772719051867319

Manual testing steps

Feature: Perps deposit from pay-with / token list

  Scenario: user initiates perps deposit from token selector
    Given user is on a confirmation screen with "Perps balance" in the token list (e.g. perps deposit and order)
    When user taps "Perps balance" to deposit
    Then the current confirmation is dismissed, deposit flow runs, and on success the user is taken to the redesigned confirmations screen with the perps header visible

Screenshots/Recordings

Before

After

simulator_screenshot_1025DB15-7197-4622-964F-F1F05143DFC8

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

Medium Risk
Changes the perps deposit tap-handler to dismiss the current approval
and navigate to a different confirmation route, so regressions could
strand users on the wrong screen or break the deposit flow sequencing.

Overview
Fixes the Perps “Add funds” action from the synthetic “Perps
balance” token so it no longer uses
useConfirmNavigation/Routes.PERPS.ROOT.

The handler now calls useApprovalRequest().onReject() to dismiss the
current approval, runs depositWithConfirmation(), and then navigates
via React Navigation to
Routes.FULL_SCREEN_CONFIRMATIONS.REDESIGNED_CONFIRMATIONS with
showPerpsHeader: true. Tests were updated to mock the new hooks
(useNavigation, useApprovalRequest) and assert the new call
order/route using waitFor.

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

[9975c8c](https://github.com/MetaMask/metamask-mobile/commit/9975c8c2bbb527663cc6022446545acda20f8049)

@runway-github runway-github Bot requested a review from a team as a code owner March 9, 2026 22:26
@github-actions

github-actions Bot commented Mar 9, 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.

@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Mar 9, 2026
@github-actions github-actions Bot added the size-M label Mar 9, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.69.0)

All E2E tests pre-selected.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 68
Missing keys 11
Type mismatches 0
Value mismatches 7 (informational)

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

@metamaskbot update-mobile-fixture

View full details | Download diff report

@sonarqubecloud

Copy link
Copy Markdown

@chloeYue chloeYue merged commit 4b2e87a into release/7.69.0 Mar 10, 2026
97 of 98 checks passed
@chloeYue chloeYue deleted the cherry-pick-7-69-0-9975c8c branch March 10, 2026 14:19
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 10, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Mar 11, 2026
@metamaskbot

Copy link
Copy Markdown
Collaborator

No release label on PR. Adding release label release-7.69.0 on PR, as PR was cherry-picked in branch 7.69.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.69.0 Issue or pull request that will be included in release 7.69.0 size-M team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants