Skip to content

Commit

Permalink
fix: roundup patch #2 based on reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
shontzu-deriv committed Apr 28, 2023
1 parent 0244cf7 commit f0cf7f5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 36 deletions.
2 changes: 1 addition & 1 deletion packages/cfd/src/Components/specbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Text } from '@deriv/components';
import { CFDAccountCopy } from './cfd-account-copy';

export type TSpecBoxProps = {
value: string | undefined;
value?: string;
is_bold?: boolean;
};

Expand Down
14 changes: 2 additions & 12 deletions packages/cfd/src/Containers/cfd-password-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,7 @@ const CFDPasswordForm = ({
i18n_default_text='Enter your {{platform}} password to add a {{platform_name}} {{account}} {{jurisdiction_shortcode}} account.'
values={{
platform: getCFDPlatformLabel(platform),
platform_name:
platform === CFD_PLATFORMS.MT5
? 'MT5'
: CFD_PLATFORMS.DXTRADE
? 'Deriv X'
: 'Deriv Ez',
platform_name: getCFDPlatformLabel(platform),
account: !show_eu_related_content ? account_title : '',
jurisdiction_shortcode: showJuristiction(),
}}
Expand All @@ -555,12 +550,7 @@ const CFDPasswordForm = ({
i18n_default_text='Enter your {{platform}} password to add a {{platform_name}} {{account}} account.'
values={{
platform: getCFDPlatformLabel(platform),
platform_name:
platform === CFD_PLATFORMS.MT5
? 'MT5'
: CFD_PLATFORMS.DXTRADE
? 'Deriv X'
: 'Deriv Ez',
platform_name: getCFDPlatformLabel(platform),
account: account_title,
}}
/>
Expand Down
10 changes: 2 additions & 8 deletions packages/cfd/src/Helpers/config.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from 'react';
import { QRCode } from 'react-qrcode';
import { TCFDsPlatformType } from 'Components/props.types';
import {
getDXTradeWebTerminalLink,
platformsText,
DERIVEZ_URL,
platforms_icons,
mobileDownloadLink,
} from './constants';
import { getDXTradeWebTerminalLink, platformsText, DERIVEZ_URL, platformsIcons, mobileDownloadLink } from './constants';
import { Text, Icon } from '@deriv/components';
import { Localize } from '@deriv/translations';
import { isMobile, OSDetect, isDesktopOs } from '@deriv/shared';
Expand Down Expand Up @@ -66,7 +60,7 @@ export const PlatformsDesktopDownload = ({ platform, dxtrade_tokens, is_demo }:
>
<Icon
className='cfd-trade-modal__dxtrade-button-icon'
icon={`IcBrand${platforms_icons(platform)}Wordmark`}
icon={`IcBrand${platformsIcons(platform)}Wordmark`}
size={36}
/>
<div className='cfd-trade-modal__dxtrade-button-text'>
Expand Down
4 changes: 2 additions & 2 deletions packages/cfd/src/Helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const platformsText = (platform: TCFDsPlatformType) => {
}
};

const platforms_icons = (platform: TCFDsPlatformType) => {
const platformsIcons = (platform: TCFDsPlatformType) => {
switch (platform) {
case 'derivez':
return 'DerivEz';
Expand Down Expand Up @@ -133,7 +133,7 @@ export {
DERIVEZ_URL,
getBrokerName,
platformsText,
platforms_icons,
platformsIcons,
getTitle,
mobileDownloadLink,
getPlatformDXTradeDownloadLink,
Expand Down
13 changes: 0 additions & 13 deletions packages/shared/src/utils/cfd/cfd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,6 @@ export const getCFDPlatformLabel = (platform: TPlatform) => {
}
};

export const getCFDPlatformNames = (platform: TPlatform) => {
switch (platform) {
case CFD_PLATFORMS.MT5:
return 'MT5';
case CFD_PLATFORMS.DXTRADE:
return 'Deriv X';
case CFD_PLATFORMS.DERIVEZ:
return 'Deriv Ez';
default:
return '';
}
};

type TIsLandingCompanyEnabled = {
landing_companies: LandingCompany;
platform: TPlatform;
Expand Down

0 comments on commit f0cf7f5

Please sign in to comment.