Skip to content

Commit 3b02219

Browse files
authored
chore: Temporarily disable order book entry point cp-7.61.0 (#23832)
<!-- 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** <!-- 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: Temporarily disable order book feature ## **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** <!-- [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] > Disables the Order Book entry point by commenting out the press handler, prop wiring, and clickable row in Perps Market Details and Statistics Card. > > - **Perps UI** > - **Market Details View (`PerpsMarketDetailsView.tsx`)**: > - Comment out `handleOrderBookPress` and remove `onOrderBookPress` prop from `PerpsMarketStatisticsCard` usage. > - **Statistics Card (`PerpsMarketStatisticsCard.tsx`)**: > - Comment out `onOrderBookPress` prop and the clickable "Order Book" row UI. > - Comment out `PerpsOrderBookViewSelectorsIDs` import; keep layout by applying `styles.statsRowFirst` unconditionally. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ee15802. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 94bc787 commit 3b02219

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

app/components/UI/Perps/Views/PerpsMarketDetailsView/PerpsMarketDetailsView.tsx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -708,20 +708,21 @@ const PerpsMarketDetailsView: React.FC<PerpsMarketDetailsViewProps> = () => {
708708
}, []);
709709

710710
// Order book handler - navigates to order book view
711-
const handleOrderBookPress = useCallback(() => {
712-
if (!market?.symbol) return;
713-
714-
track(MetaMetricsEvents.PERPS_UI_INTERACTION, {
715-
[PerpsEventProperties.INTERACTION_TYPE]:
716-
PerpsEventValues.INTERACTION_TYPE.TAP,
717-
[PerpsEventProperties.ASSET]: market.symbol,
718-
});
719-
720-
navigation.navigate(Routes.PERPS.ORDER_BOOK, {
721-
symbol: market.symbol,
722-
marketData: market,
723-
});
724-
}, [market, navigation, track]);
711+
// Temporarily disabled - uncomment to re-enable order book entry point
712+
// const handleOrderBookPress = useCallback(() => {
713+
// if (!market?.symbol) return;
714+
715+
// track(MetaMetricsEvents.PERPS_UI_INTERACTION, {
716+
// [PerpsEventProperties.INTERACTION_TYPE]:
717+
// PerpsEventValues.INTERACTION_TYPE.TAP,
718+
// [PerpsEventProperties.ASSET]: market.symbol,
719+
// });
720+
721+
// navigation.navigate(Routes.PERPS.ORDER_BOOK, {
722+
// symbol: market.symbol,
723+
// marketData: market,
724+
// });
725+
// }, [market, navigation, track]);
725726

726727
// Close position handler
727728
const handleClosePosition = useCallback(() => {
@@ -1040,7 +1041,8 @@ const PerpsMarketDetailsView: React.FC<PerpsMarketDetailsViewProps> = () => {
10401041
nextFundingTime={market?.nextFundingTime}
10411042
fundingIntervalHours={market?.fundingIntervalHours}
10421043
dexName={market?.marketSource || undefined}
1043-
onOrderBookPress={handleOrderBookPress}
1044+
// Temporarily disabled - uncomment to re-enable order book entry point
1045+
// onOrderBookPress={handleOrderBookPress}
10441046
/>
10451047
</View>
10461048

app/components/UI/Perps/components/PerpsMarketStatisticsCard/PerpsMarketStatisticsCard.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import styleSheet from './PerpsMarketStatisticsCard.styles';
1616
import type { PerpsMarketStatisticsCardProps } from './PerpsMarketStatisticsCard.types';
1717
import {
1818
PerpsMarketDetailsViewSelectorsIDs,
19-
PerpsOrderBookViewSelectorsIDs,
19+
// PerpsOrderBookViewSelectorsIDs,
2020
} from '../../../../../../e2e/selectors/Perps/Perps.selectors';
2121
import FundingCountdown from '../FundingCountdown';
2222
import { usePerpsLivePrices } from '../../hooks/stream';
@@ -35,7 +35,7 @@ const PerpsMarketStatisticsCard: React.FC<PerpsMarketStatisticsCardProps> = ({
3535
nextFundingTime,
3636
fundingIntervalHours,
3737
dexName,
38-
onOrderBookPress,
38+
// onOrderBookPress,
3939
}) => {
4040
const { styles } = useStyles(styleSheet, {});
4141

@@ -126,7 +126,8 @@ const PerpsMarketStatisticsCard: React.FC<PerpsMarketStatisticsCardProps> = ({
126126
{/* Stats rows with card background */}
127127
<View style={styles.statsRowsContainer}>
128128
{/* Order Book - Clickable row */}
129-
{onOrderBookPress && (
129+
{/* TODO: Re-enable order book row, when feature has been more fully tested */}
130+
{/* {onOrderBookPress && (
130131
<TouchableOpacity
131132
style={[styles.orderBookRow, styles.statsRowFirst]}
132133
onPress={onOrderBookPress}
@@ -143,7 +144,7 @@ const PerpsMarketStatisticsCard: React.FC<PerpsMarketStatisticsCardProps> = ({
143144
color={IconColor.Alternative}
144145
/>
145146
</TouchableOpacity>
146-
)}
147+
)} */}
147148

148149
{/* 24h volume */}
149150
<KeyValueRow
@@ -161,7 +162,11 @@ const PerpsMarketStatisticsCard: React.FC<PerpsMarketStatisticsCardProps> = ({
161162
color: TextColor.Default,
162163
},
163164
}}
164-
style={[styles.statsRow, !onOrderBookPress && styles.statsRowFirst]}
165+
style={[
166+
styles.statsRow,
167+
// !onOrderBookPress &&
168+
styles.statsRowFirst,
169+
]}
165170
/>
166171

167172
{/* Open interest with tooltip */}

0 commit comments

Comments
 (0)