From e7c12ed120362ea4b5a6744cac4b405132e73d31 Mon Sep 17 00:00:00 2001
From: balakrishna-deriv <56330681+balakrishna-deriv@users.noreply.github.com>
Date: Mon, 1 Apr 2024 17:14:58 +0800
Subject: [PATCH] Revert "Revert "Akmal / feat: update entry spot description
(#13854)" (#13865)" (#14415)
This reverts commit c63115ed502da2cef572a57fc791de75d3ad5879.
---
.../ContractTypeInfo/contract-type-glossary.tsx | 8 ++------
.../ContractTypeInfo/contract-type-info.tsx | 6 ++----
.../__tests__/contract-type-glossary.spec.tsx | 10 +---------
3 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-glossary.tsx b/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-glossary.tsx
index c85d5942fc27..0f33a5d6563c 100644
--- a/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-glossary.tsx
+++ b/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-glossary.tsx
@@ -6,12 +6,10 @@ import { Localize } from '@deriv/translations';
const ContractTypeGlossary = ({
category,
is_vanilla_fx = false,
- is_major_pairs = false,
is_multiplier_fx = false,
}: {
category: string;
is_vanilla_fx?: boolean;
- is_major_pairs?: boolean;
is_multiplier_fx?: boolean;
}) => {
let content;
@@ -235,10 +233,8 @@ const ContractTypeGlossary = ({
{ type: 'heading', text: },
{
type: 'paragraph',
- text: is_major_pairs ? (
-
- ) : (
-
+ text: (
+
),
},
{ type: 'heading', text: },
diff --git a/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-info.tsx b/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-info.tsx
index 795883dbc8ac..2e69775b0818 100644
--- a/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-info.tsx
+++ b/packages/trader/src/Modules/Trading/Components/Form/ContractType/ContractTypeInfo/contract-type-info.tsx
@@ -6,7 +6,7 @@ import { localize } from '@deriv/translations';
import { Analytics } from '@deriv-com/analytics';
import TradeCategories from 'Assets/Trading/Categories/trade-categories';
import TradeCategoriesGIF from 'Assets/Trading/Categories/trade-categories-gif';
-import { getContractTypes, isMajorPairsSymbol } from '../../../../Helpers/contract-type';
+import { getContractTypes } from '../../../../Helpers/contract-type';
import ContractTypeGlossary from './contract-type-glossary';
import classNames from 'classnames';
import { useTraderStore } from 'Stores/useTraderStores';
@@ -31,9 +31,8 @@ const TABS = {
type TSelectedTab = 'description' | 'glossary';
const Info = observer(({ handleSelect, item, selected_value, list, info_banner }: TInfo) => {
- const { cached_multiplier_cancellation_list, symbol } = useTraderStore();
+ const { cached_multiplier_cancellation_list } = useTraderStore();
const {
- active_symbols: { active_symbols },
ui: { is_mobile },
modules: {
trade: { is_vanilla_fx },
@@ -131,7 +130,6 @@ const Info = observer(({ handleSelect, item, selected_value, list, info_banner }
category={type.value}
is_vanilla_fx={is_vanilla_fx}
is_multiplier_fx={!cached_multiplier_cancellation_list?.length}
- is_major_pairs={isMajorPairsSymbol(symbol, active_symbols)}
/>
)}
diff --git a/packages/trader/src/Modules/Trading/Components/Form/ContractType/__tests__/contract-type-glossary.spec.tsx b/packages/trader/src/Modules/Trading/Components/Form/ContractType/__tests__/contract-type-glossary.spec.tsx
index 886aa5895cbb..f766f4c804ec 100644
--- a/packages/trader/src/Modules/Trading/Components/Form/ContractType/__tests__/contract-type-glossary.spec.tsx
+++ b/packages/trader/src/Modules/Trading/Components/Form/ContractType/__tests__/contract-type-glossary.spec.tsx
@@ -38,16 +38,8 @@ describe('', () => {
expect(screen.getByText(deal_cancellation)).toBeInTheDocument();
expect(screen.getByText(stop_out)).toBeInTheDocument();
});
- it('Ensure TRADE_TYPES.MULTIPLIER glossary is rendered properly if it is multiplier_fx', () => {
- render();
-
- expect(screen.queryByText(deal_cancellation)).not.toBeInTheDocument();
- expect(screen.getByText(/current-tick-execution/i)).toBeInTheDocument();
- expect(screen.queryByText(/next-tick-execution/i)).not.toBeInTheDocument();
- expect(screen.getByText(stop_out)).toBeInTheDocument();
- });
it('Ensure TRADE_TYPES.MULTIPLIER glossary is rendered properly if it is major pairs symbol and multiplier_fx', () => {
- render();
+ render();
expect(screen.queryByText(deal_cancellation)).not.toBeInTheDocument();
expect(screen.queryByText(/current-tick-execution/i)).not.toBeInTheDocument();