Commit 2b602f5
chore(runway): cherry-pick fix(perps): set confirmation header and safe area by navigation source cp-7.64.0 (#25627)
- fix(perps): set confirmation header and safe area by navigation source
cp-7.64.0 (#25601)
## **Description**
Set confirmation header by navigation source
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: Fixed Perps confirmation screen so the header is hidden
when opening from the one-click order flow and shows a minimal header
when opening from other flows.
## **Related issues**
Fixes: #25469
## **Manual testing steps**
```gherkin
Feature: Perps confirmation screen header
Scenario: user opens confirmation via one-click order (navigateToOrder)
Given user is on a Perps market and taps place order (one-click flow)
When deposit is confirmed and confirmation screen opens
Then the confirmation screen has no header (header: () => null)
Scenario: user opens confirmation from another flow
Given user reaches RedesignedConfirmations from a path other than navigateToOrder
When the confirmation screen is shown
Then the screen shows a minimal header (header visible, no left button, empty title)
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<img width="1206" height="2622" alt="Simulator Screenshot - iPhone 17
Pro - 2026-02-03 at 19 47 49"
src="https://github.com/user-attachments/assets/8ff43507-5222-426c-a86a-a30a6403baa6"
/>
<!-- [screenshots/recordings] -->
### **After**
<img width="1206" height="2622" alt="Simulator Screenshot - iPhone 17
Pro - 2026-02-03 at 19 46 49"
src="https://github.com/user-attachments/assets/d374525a-5732-4049-9c73-da03bd5f29d6"
/>
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes Perps navigation params and `RedesignedConfirmations` screen
options, which can affect the confirmation flow’s header visibility and
layout. Risk is limited to Perps UI/navigation but could cause
regressions if other entry points don’t pass expected params.
>
> **Overview**
> Updates Perps confirmations to **conditionally show/hide the header
and safe area** based on the navigation source.
>
> Adds `CONFIRMATION_HEADER_CONFIG` and a `showPerpsHeader` navigation
param; `navigateToOrder` now passes `showPerpsHeader: false` for the
deposit-and-trade (one-click) path, while other paths default to a
minimal header.
>
> The Perps stack now derives `RedesignedConfirmations` screen options
from route params (and toggles `Confirm`’s `disableSafeArea`
accordingly), with types and tests updated to cover the new param
behavior.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7d77188. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
[2bc0e0e](2bc0e0e)
Co-authored-by: Michal Szorad <michal.szorad@consensys.net>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent d0cc084 commit 2b602f5
5 files changed
Lines changed: 64 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
131 | 142 | | |
132 | 143 | | |
133 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
139 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
140 | 147 | | |
141 | 148 | | |
142 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | | - | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
51 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
52 | 77 | | |
53 | 78 | | |
54 | 79 | | |
55 | | - | |
| 80 | + | |
56 | 81 | | |
57 | 82 | | |
58 | 83 | | |
| |||
394 | 419 | | |
395 | 420 | | |
396 | 421 | | |
397 | | - | |
398 | | - | |
399 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
400 | 425 | | |
401 | 426 | | |
402 | 427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
| |||
0 commit comments