From a543b67d6447711c9d744bc736801e57cffaf2d8 Mon Sep 17 00:00:00 2001 From: shontzu-deriv Date: Mon, 8 May 2023 11:39:55 +0800 Subject: [PATCH] fix: roundup patch #3 based on code reviews --- .../cfd/src/Containers/cfd-password-modal.tsx | 23 ++++++++++++------- packages/cfd/src/Containers/trade-modal.tsx | 6 ++--- packages/cfd/src/Helpers/config.tsx | 4 ++-- packages/core/src/Stores/client-store.js | 6 ++--- packages/core/src/Stores/traders-hub-store.js | 1 - 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/packages/cfd/src/Containers/cfd-password-modal.tsx b/packages/cfd/src/Containers/cfd-password-modal.tsx index a4c9537ea57c..d07a963b32d3 100644 --- a/packages/cfd/src/Containers/cfd-password-modal.tsx +++ b/packages/cfd/src/Containers/cfd-password-modal.tsx @@ -807,19 +807,26 @@ const CFDPasswordModal = ({ const mt5_platform_label = jurisdiction_selected_shortcode !== 'maltainvest' ? 'MT5' : ''; if (category === 'real') { + let platformName = ''; + switch (platform) { + case CFD_PLATFORMS.MT5: + platformName = mt5_platform_label; + break; + case CFD_PLATFORMS.DERIVEZ: + platformName = 'Deriv Ez'; + break; + default: + platformName = 'Deriv X'; + break; + } + return ( )} diff --git a/packages/cfd/src/Containers/trade-modal.tsx b/packages/cfd/src/Containers/trade-modal.tsx index c88f24cfab38..33397296532e 100644 --- a/packages/cfd/src/Containers/trade-modal.tsx +++ b/packages/cfd/src/Containers/trade-modal.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Text, Icon, Money } from '@deriv/components'; import { TTradingPlatformAccounts, TCFDDashboardContainer, TCFDsPlatformType } from 'Components/props.types'; import { DetailsOfEachMT5Loginid } from '@deriv/api-types'; -import { CFD_PLATFORMS, getCFDAccountKey, isMobile, capitalizeFirstLetter } from '@deriv/shared'; +import { CFD_PLATFORMS, getCFDAccountKey, isMobile } from '@deriv/shared'; import { localize, Localize } from '@deriv/translations'; import { getPlatformQRCode, PlatformsDesktopDownload } from '../Helpers/config'; import { getTitle, platformsText, mobileDownloadLink } from '../Helpers/constants'; @@ -54,13 +54,13 @@ const TradeModal = ({ platform, }: TTradeModalProps) => { const CTraderAndDerivEZDescription = () => { - const description = platform === 'derivez' ? 'Deriv EZ' : 'cTrader'; + const platform_name = platform === 'derivez' ? 'Deriv EZ' : 'cTrader'; return (
diff --git a/packages/cfd/src/Helpers/config.tsx b/packages/cfd/src/Helpers/config.tsx index 087107ba4696..bc47d02f7b0f 100644 --- a/packages/cfd/src/Helpers/config.tsx +++ b/packages/cfd/src/Helpers/config.tsx @@ -8,7 +8,7 @@ import { isMobile, OSDetect, isDesktopOs } from '@deriv/shared'; import { TCFDDashboardContainer } from 'Containers/props.types'; export const getPlatformQRCode = (acc_type: TCFDsPlatformType) => { - const qr_code_mobile = isMobile() ? '100%' : '80%'; + const qr_code_width = isMobile() ? '100%' : '80%'; const os = OSDetect(); const checkForDesktop = isDesktopOs() ? (os === 'mac' ? 'ios' : 'android') : os; @@ -17,7 +17,7 @@ export const getPlatformQRCode = (acc_type: TCFDsPlatformType) => {