Skip to content

Commit a126cf4

Browse files
chore(runway): cherry-pick fix: perp and short transition cp-7.73.0 (#28700)
- fix: perp and short transition cp-7.73.0 (#28689) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Fix perps and short transition <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **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: ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin 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** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/c922da17-10ce-4ed4-b1c0-7690cbe8471b <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] 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** > Touches React Navigation screen options for the perps confirmation flow, which can affect modal presentation/transition behavior and header visibility across routes. > > **Overview** > Adjusts the perps `RedesignedConfirmations` screen options to explicitly return `StackNavigationOptions` and always use `presentation: 'transparentModal'`, while keeping the conditional perps header behavior. > > This is intended to fix the perps/short transition behavior by ensuring confirmations are presented with a consistent transparent modal configuration. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ccdf1f4. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> [5517bff](5517bff) Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
1 parent a815a8b commit a126cf4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app/components/UI/Perps/routes/index.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { createStackNavigator } from '@react-navigation/stack';
1+
import {
2+
createStackNavigator,
3+
type StackNavigationOptions,
4+
} from '@react-navigation/stack';
25
import React from 'react';
36
import { useSelector } from 'react-redux';
47
import type { PerpsNavigationParamList } from '../types/navigation';
@@ -52,14 +55,15 @@ const styles = StyleSheet.create({
5255

5356
function getRedesignedConfirmationsHeaderOptions({
5457
showPerpsHeader = CONFIRMATION_HEADER_CONFIG.DefaultShowPerpsHeader,
55-
}: PerpsNavigationParamList['RedesignedConfirmations'] = {}) {
58+
}: PerpsNavigationParamList['RedesignedConfirmations'] = {}): StackNavigationOptions {
5659
return showPerpsHeader
57-
? {
60+
? ({
5861
headerLeft: () => null,
5962
headerShown: true,
6063
title: '',
61-
}
62-
: { header: () => null };
64+
presentation: 'transparentModal',
65+
} as const)
66+
: ({ header: () => null, presentation: 'transparentModal' } as const);
6367
}
6468

6569
const PerpsConfirmScreen = () => {

0 commit comments

Comments
 (0)