diff --git a/packages/cfd/src/Containers/cfd-compare-accounts/cfd-instruments-label-highlighted.tsx b/packages/cfd/src/Containers/cfd-compare-accounts/cfd-instruments-label-highlighted.tsx
index 5d542839c2ab..5d63800f9776 100644
--- a/packages/cfd/src/Containers/cfd-compare-accounts/cfd-instruments-label-highlighted.tsx
+++ b/packages/cfd/src/Containers/cfd-compare-accounts/cfd-instruments-label-highlighted.tsx
@@ -1,6 +1,4 @@
import React from 'react';
-import { Text } from '@deriv/components';
-import { Localize } from '@deriv/translations';
import InstrumentsIconWithLabel from './instruments-icon-with-label';
import { TInstrumentsIcon, TCompareAccountsCard } from 'Components/props.types';
import { getHighlightedIconLabel } from '../../Helpers/compare-accounts-config';
@@ -17,7 +15,7 @@ const CFDInstrumentsLabelHighlighted = ({ trading_platforms }: TCompareAccountsC
{is_eu_user ? (
{iconData
- .filter(item => item.highlighted)
+ .filter(instrument => instrument.is_available !== false)
.map(item => (
))}
-
-
-
-
-
) : (
iconData.map(item => (
diff --git a/packages/cfd/src/Containers/cfd-compare-accounts/instruments-icon-with-label.tsx b/packages/cfd/src/Containers/cfd-compare-accounts/instruments-icon-with-label.tsx
index 2ff4404647bd..237171117a3e 100644
--- a/packages/cfd/src/Containers/cfd-compare-accounts/instruments-icon-with-label.tsx
+++ b/packages/cfd/src/Containers/cfd-compare-accounts/instruments-icon-with-label.tsx
@@ -6,6 +6,7 @@ import TradingInstrumentsIcon from '../../Assets/svgs/trading-instruments';
const InstrumentsIconWithLabel = ({ icon, text, highlighted, className, is_asterisk }: TInstrumentsIcon) => {
const { isMobile } = useDevice();
+
return (
({
@@ -78,23 +87,24 @@ const getHighlightedIconLabel = (
const getAccountCardTitle = (shortcode: string, is_demo?: boolean) => {
switch (shortcode) {
case MARKET_TYPE_SHORTCODE.SYNTHETIC:
- return is_demo ? localize('Standard Demo') : localize('Standard');
+ return is_demo ? localize('Standard demo') : localize('Standard');
case MARKET_TYPE_SHORTCODE.FINANCIAL:
- return is_demo ? localize('Financial Demo') : localize('Financial');
+ return is_demo ? localize('Financial demo') : localize('Financial');
case MARKET_TYPE_SHORTCODE.FINANCIAL_LABUAN:
return localize('Financial - STP');
case MARKET_TYPE_SHORTCODE.FINANCIAL_GOLD:
- return is_demo ? localize('Gold Demo') : localize('Gold');
+ case MARKET_TYPE_SHORTCODE.CFDS_GOLD:
+ return is_demo ? localize('Gold demo') : localize('Gold');
case MARKET_TYPE_SHORTCODE.ALL_SWAP_FREE_SVG:
- return is_demo ? localize('Swap-Free Demo') : localize('Swap-Free');
+ return is_demo ? localize('Swap-Free demo') : localize('Swap-Free');
case MARKET_TYPE_SHORTCODE.ALL_ZERO_SPREAD_BVI:
- return is_demo ? localize('Zero Spread Demo') : localize('Zero Spread');
+ return is_demo ? localize('Zero Spread demo') : localize('Zero Spread');
case CFD_PLATFORMS.DXTRADE:
- return is_demo ? localize('Deriv X Demo') : localize('Deriv X');
+ return is_demo ? localize('Deriv X demo') : localize('Deriv X');
case CFD_PLATFORMS.CTRADER:
- return is_demo ? localize('Deriv cTrader Demo') : localize('Deriv cTrader');
+ return is_demo ? localize('Deriv cTrader demo') : localize('Deriv cTrader');
default:
- return is_demo ? localize('CFDs Demo') : localize('CFDs');
+ return is_demo ? localize('CFDs demo') : localize('CFDs');
}
};
@@ -146,7 +156,12 @@ const getAccountIcon = (shortcode: string, product?: TProducts) => {
case CFD_PLATFORMS.CTRADER:
return 'CTrader';
default:
- return 'CFDs';
+ switch (product) {
+ case PRODUCT.GOLD:
+ return 'Gold';
+ default:
+ return 'CFDs';
+ }
}
};
@@ -240,10 +255,26 @@ const getSortedCFDAvailableAccounts = (available_accounts: TModifiedTradingPlatf
)
.map(item => ({ ...item, platform: CFD_PLATFORMS.MT5 }) as const);
+ const gold_accounts = available_accounts
+ .filter(
+ item =>
+ item.market_type === MARKET_TYPE.FINANCIAL &&
+ item.shortcode !== JURISDICTION.MALTA_INVEST &&
+ item.product === PRODUCT.GOLD &&
+ item.is_default_jurisdiction === 'true'
+ )
+ .map(item => ({ ...item, platform: CFD_PLATFORMS.MT5 }) as const);
+
const gaming_accounts = available_accounts
.filter(item => item.market_type === MARKET_TYPE.GAMING && item.is_default_jurisdiction === 'true')
.map(item => ({ ...item, platform: CFD_PLATFORMS.MT5 }) as const);
- return [...gaming_accounts, ...financial_accounts, ...swap_free_accounts, ...zero_spread_accounts];
+ return [
+ ...gaming_accounts,
+ ...financial_accounts,
+ ...swap_free_accounts,
+ ...zero_spread_accounts,
+ ...gold_accounts,
+ ];
};
// Get the maltainvest accounts for EU and DIEL clients
@@ -253,11 +284,22 @@ const getEUAvailableAccounts = (available_accounts: TModifiedTradingPlatformAvai
item =>
item.market_type === MARKET_TYPE.FINANCIAL &&
item.shortcode === JURISDICTION.MALTA_INVEST &&
- item.product !== PRODUCT.GOLD &&
- item.is_default_jurisdiction === 'true'
+ item.is_default_jurisdiction === 'true' &&
+ item.product !== PRODUCT.GOLD
+ )
+ .map(item => ({ ...item, platform: CFD_PLATFORMS.MT5 }) as const);
+
+ const gold_accounts = available_accounts
+ .filter(
+ item =>
+ item.market_type === MARKET_TYPE.FINANCIAL &&
+ item.shortcode === JURISDICTION.MALTA_INVEST &&
+ item.is_default_jurisdiction === 'true' &&
+ item.product === PRODUCT.GOLD
)
.map(item => ({ ...item, platform: CFD_PLATFORMS.MT5 }) as const);
- return [...financial_accounts];
+
+ return [...financial_accounts, ...gold_accounts];
};
// Make the Deriv X data same as trading_platform_available_accounts
@@ -316,14 +358,17 @@ const getMT5DemoData = (available_accounts: TModifiedTradingPlatformAvailableAcc
item.platform === CFD_PLATFORMS.MT5
);
const financial_demo_accounts = available_accounts.filter(
- item => item.market_type === MARKET_TYPE.FINANCIAL && item.shortcode === JURISDICTION.SVG
+ item =>
+ item.market_type === MARKET_TYPE.FINANCIAL && item.product !== PRODUCT.STP && item.product !== PRODUCT.GOLD
);
const gaming_demo_accounts = available_accounts.filter(
item => item.market_type === MARKET_TYPE.GAMING && item.shortcode === JURISDICTION.SVG
);
+
const gold_demo_accounts = available_accounts.filter(
item => item.market_type === MARKET_TYPE.FINANCIAL && item.product === PRODUCT.GOLD
);
+
return [
...gaming_demo_accounts,
...financial_demo_accounts,