From 875850e10ede456facb9e2eef2acbf8fd6e4bb33 Mon Sep 17 00:00:00 2001 From: Shaheer Date: Thu, 27 Apr 2023 12:09:33 +0400 Subject: [PATCH 1/2] refactor: :recycle: refactors the code --- .../poi-poa-docs-submitted.jsx | 6 ++--- packages/cfd/src/Components/props.types.ts | 1 + .../cfd-financial-stp-real-account-signup.tsx | 9 ++----- .../cfd/src/Containers/cfd-password-modal.tsx | 27 ++++++++++++------- .../jurisdiction-modal-checkbox.tsx | 18 ++++++------- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/packages/account/src/Components/poi-poa-docs-submitted/poi-poa-docs-submitted.jsx b/packages/account/src/Components/poi-poa-docs-submitted/poi-poa-docs-submitted.jsx index 4744967cbe0c..5e0be0c7377e 100644 --- a/packages/account/src/Components/poi-poa-docs-submitted/poi-poa-docs-submitted.jsx +++ b/packages/account/src/Components/poi-poa-docs-submitted/poi-poa-docs-submitted.jsx @@ -33,9 +33,9 @@ const PoiPoaDocsSubmitted = ({ const getDescription = () => { const { manual_status, poi_verified_for_vanuatu_maltainvest, poi_verified_for_bvi_labuan, poa_pending } = getAuthenticationStatusInfo(account_status); - const is_vanuatu_or_maltainvest_selected = - jurisdiction_selected_shortcode === Jurisdiction.VANUATU || - jurisdiction_selected_shortcode === Jurisdiction.MALTA_INVEST; + const is_vanuatu_or_maltainvest_selected = [Jurisdiction.VANUATU, Jurisdiction.MALTA_INVEST].includes( + jurisdiction_selected_shortcode + ); if ( (is_vanuatu_or_maltainvest_selected && poi_verified_for_vanuatu_maltainvest && poa_pending) || (!is_vanuatu_or_maltainvest_selected && poi_verified_for_bvi_labuan && poa_pending) || diff --git a/packages/cfd/src/Components/props.types.ts b/packages/cfd/src/Components/props.types.ts index fa9f8f3415b5..9496efa3d762 100644 --- a/packages/cfd/src/Components/props.types.ts +++ b/packages/cfd/src/Components/props.types.ts @@ -103,6 +103,7 @@ export type TJurisdictionCardItemVerificationItem = | 'identity_document' | 'name_and_address' | 'not_applicable'; + export type TJurisdictionCardItemVerification = Array; export type TJurisdictionCardItems = { diff --git a/packages/cfd/src/Containers/cfd-financial-stp-real-account-signup.tsx b/packages/cfd/src/Containers/cfd-financial-stp-real-account-signup.tsx index 46772599ad6b..08f9b4fa3c01 100644 --- a/packages/cfd/src/Containers/cfd-financial-stp-real-account-signup.tsx +++ b/packages/cfd/src/Containers/cfd-financial-stp-real-account-signup.tsx @@ -112,17 +112,12 @@ const CFDFinancialStpRealAccountSignup = (props: TCFDFinancialStpRealAccountSign }; const should_show_poi = () => { - if ( - jurisdiction_selected_shortcode === Jurisdiction.VANUATU || - jurisdiction_selected_shortcode === Jurisdiction.MALTA_INVEST - ) { + if ([Jurisdiction.VANUATU, Jurisdiction.MALTA_INVEST].includes(jurisdiction_selected_shortcode)) { return need_poi_for_vanuatu_maltainvest; } return need_poi_for_bvi_labuan; }; - const should_show_poa = !( - authentication_status.document_status === 'pending' || authentication_status.document_status === 'verified' - ); + const should_show_poa = !['pending', 'verified'].includes(authentication_status.document_status); const should_show_personal_details = !has_submitted_cfd_personal_details && jurisdiction_selected_shortcode !== Jurisdiction.MALTA_INVEST; diff --git a/packages/cfd/src/Containers/cfd-password-modal.tsx b/packages/cfd/src/Containers/cfd-password-modal.tsx index 3b18a2229ad5..2fc1877c29c3 100644 --- a/packages/cfd/src/Containers/cfd-password-modal.tsx +++ b/packages/cfd/src/Containers/cfd-password-modal.tsx @@ -662,16 +662,23 @@ const CFDPasswordModal = ({ const [is_selected_mt5_verified, setIsSelectedMT5Verified] = React.useState(false); const getVerificationStatus = () => { - if (jurisdiction_selected_shortcode === Jurisdiction.SVG) { - setIsSelectedMT5Verified(true); - } else if (jurisdiction_selected_shortcode === Jurisdiction.BVI) { - setIsSelectedMT5Verified(poi_verified_for_bvi_labuan); - } else if (jurisdiction_selected_shortcode === Jurisdiction.VANUATU) { - setIsSelectedMT5Verified(poi_verified_for_vanuatu_maltainvest); - } else if (jurisdiction_selected_shortcode === Jurisdiction.LABUAN) { - setIsSelectedMT5Verified(poi_verified_for_bvi_labuan && poa_verified); - } else if (jurisdiction_selected_shortcode === Jurisdiction.MALTA_INVEST) { - setIsSelectedMT5Verified(poi_verified_for_vanuatu_maltainvest && poa_verified); + switch (jurisdiction_selected_shortcode) { + case Jurisdiction.SVG: + setIsSelectedMT5Verified(true); + break; + case Jurisdiction.BVI: + setIsSelectedMT5Verified(poi_verified_for_bvi_labuan); + break; + case Jurisdiction.VANUATU: + setIsSelectedMT5Verified(poi_verified_for_vanuatu_maltainvest); + break; + case Jurisdiction.LABUAN: + setIsSelectedMT5Verified(poi_verified_for_bvi_labuan && poa_verified); + break; + case Jurisdiction.MALTA_INVEST: + setIsSelectedMT5Verified(poi_verified_for_vanuatu_maltainvest && poa_verified); + break; + default: } }; diff --git a/packages/cfd/src/Containers/jurisdiction-modal/jurisdiction-modal-checkbox.tsx b/packages/cfd/src/Containers/jurisdiction-modal/jurisdiction-modal-checkbox.tsx index 1cc3886b63a6..7de131031f52 100644 --- a/packages/cfd/src/Containers/jurisdiction-modal/jurisdiction-modal-checkbox.tsx +++ b/packages/cfd/src/Containers/jurisdiction-modal/jurisdiction-modal-checkbox.tsx @@ -14,17 +14,15 @@ const JurisdictionCheckBox = ({ should_restrict_vanuatu_account_creation, }: TJurisdictionCheckBoxProps) => { const shouldShowCheckBox = () => { - if (jurisdiction_selected_shortcode) { - if ( - jurisdiction_selected_shortcode === Jurisdiction.SVG || - (jurisdiction_selected_shortcode === Jurisdiction.BVI && should_restrict_bvi_account_creation) || - (jurisdiction_selected_shortcode === Jurisdiction.VANUATU && should_restrict_vanuatu_account_creation) - ) { - return false; - } - return true; + if ( + !jurisdiction_selected_shortcode || + jurisdiction_selected_shortcode === Jurisdiction.SVG || + (jurisdiction_selected_shortcode === Jurisdiction.BVI && should_restrict_bvi_account_creation) || + (jurisdiction_selected_shortcode === Jurisdiction.VANUATU && should_restrict_vanuatu_account_creation) + ) { + return false; } - return false; + return true; }; const dbvi_company_names: { [key: string]: { [key: string]: string } } = { From 5b15629fc8c96190ef409096ce290e653db0b331 Mon Sep 17 00:00:00 2001 From: Shaheer Date: Thu, 27 Apr 2023 12:32:44 +0400 Subject: [PATCH 2/2] refactor: :recycle: refactors jurisdiction localize usages --- .../jurisdiction-bvi-contents.ts | 48 +++++++++---------- .../jurisdiction-labuan-contents.ts | 40 ++++++++-------- .../jurisdiction-svg-contents.ts | 44 ++++++++--------- .../jurisdiction-vanuatu-contents.ts | 44 ++++++++--------- .../jurisdiction-verification-contents.ts | 18 +++---- .../jurisdiction_maltainvest_contents.ts | 48 +++++++++---------- 6 files changed, 119 insertions(+), 123 deletions(-) diff --git a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-bvi-contents.ts b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-bvi-contents.ts index a0219aaf6a67..a75a67d69638 100644 --- a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-bvi-contents.ts +++ b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-bvi-contents.ts @@ -7,84 +7,80 @@ export const jurisdictionBviContents = (): TJurisdictionCardItems => ({ synthetic_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Synthetics, Basket indices and Derived FX')}`, + title: localize('Assets'), + description: localize('Synthetics, Basket indices and Derived FX'), title_indicators: { type: 'displayText', - display_text: `${localize('40+')}`, + display_text: localize('40+'), display_text_skin_color: 'red-darker', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:1000')}`, + display_text: localize('1:1000'), display_text_skin_color: 'yellow-light', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize( - 'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)' - )}`, + title: localize('Regulator/EDR'), + description: localize('British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)'), }, ], financial_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies')}`, + title: localize('Assets'), + description: localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies'), title_indicators: { type: 'displayText', - display_text: `${localize('170+')}`, + display_text: localize('170+'), display_text_skin_color: 'red-light', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:1000')}`, + display_text: localize('1:1000'), display_text_skin_color: 'yellow-light', }, }, { key: 'spreadsFrom', - title: `${localize('Spreads from')}`, + title: localize('Spreads from'), title_indicators: { type: 'displayText', - display_text: `${localize('0.5 pips')}`, + display_text: localize('0.5 pips'), display_text_skin_color: 'violet-dark', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize( - 'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)' - )}`, + title: localize('Regulator/EDR'), + description: localize('British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)'), }, ], synthetic_verification_docs: ['document_number', 'name_and_address'], diff --git a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-labuan-contents.ts b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-labuan-contents.ts index d9e62498a47f..01e22390d7da 100644 --- a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-labuan-contents.ts +++ b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-labuan-contents.ts @@ -6,69 +6,69 @@ export const jurisdictionLabuanContents = (): TJurisdictionCardItems => ({ is_over_header_available: true, header: localize('Labuan'), synthetic_contents: [ - { key: 'assets', title: `${localize('Assets')}`, description: `${localize('Forex and Cryptocurrencies')}` }, - { key: 'leverage', title: `${localize('Leverage')}` }, + { key: 'assets', title: localize('Assets'), description: localize('Forex and Cryptocurrencies') }, + { key: 'leverage', title: localize('Leverage') }, { key: 'spreadsFrom', - title: `${localize('Spreads from')}`, + title: localize('Spreads from'), }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Labuan Financial Services Authority (licence no. MB/18/0024)')}`, + title: localize('Regulator/EDR'), + description: localize('Labuan Financial Services Authority (licence no. MB/18/0024)'), }, ], financial_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Forex and Cryptocurrencies')}`, + title: localize('Assets'), + description: localize('Forex and Cryptocurrencies'), title_indicators: { type: 'displayText', - display_text: `${localize('90+')}`, + display_text: localize('90+'), display_text_skin_color: 'red-dark', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:100')}`, + display_text: localize('1:100'), display_text_skin_color: 'yellow-dark', }, }, { key: 'spreadsFrom', - title: `${localize('Spreads from')}`, + title: localize('Spreads from'), title_indicators: { type: 'displayText', - display_text: `${localize('0.6 pips')}`, + display_text: localize('0.6 pips'), display_text_skin_color: 'violet-dark', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Labuan Financial Services Authority (licence no. MB/18/0024)')}`, + title: localize('Regulator/EDR'), + description: localize('Labuan Financial Services Authority (licence no. MB/18/0024)'), }, ], synthetic_verification_docs: ['document_number', 'name_and_address'], diff --git a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-svg-contents.ts b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-svg-contents.ts index 4fcc96e8353a..23541a6f3a5c 100644 --- a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-svg-contents.ts +++ b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-svg-contents.ts @@ -7,78 +7,78 @@ export const jurisdictionSvgContents = (): TJurisdictionCardItems => ({ synthetic_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Synthetics, Basket indices and Derived FX')}`, + title: localize('Assets'), + description: localize('Synthetics, Basket indices and Derived FX'), title_indicators: { type: 'displayText', - display_text: `${localize('40+')}`, + display_text: localize('40+'), display_text_skin_color: 'red-darker', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:1000')}`, + display_text: localize('1:1000'), display_text_skin_color: 'yellow-light', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, - description: `${localize( + description: localize( 'You will need to submit proof of identity and address once you reach certain thresholds.' - )}`, + ), }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Deriv (SVG) LLC (company no. 273 LLC 2020)')}`, + title: localize('Regulator/EDR'), + description: localize('Deriv (SVG) LLC (company no. 273 LLC 2020)'), }, ], financial_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies')}`, + title: localize('Assets'), + description: localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies'), title_indicators: { type: 'displayText', - display_text: `${localize('170+')}`, + display_text: localize('170+'), display_text_skin_color: 'red-light', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:1000')}`, + display_text: localize('1:1000'), display_text_skin_color: 'yellow-light', }, }, { key: 'spreadsFrom', - title: `${localize('Spreads from')}`, + title: localize('Spreads from'), title_indicators: { type: 'displayText', - display_text: `${localize('0.6 pips')}`, + display_text: localize('0.6 pips'), display_text_skin_color: 'violet-dark', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, - description: `${localize( + description: localize( 'You will need to submit proof of identity and address once you reach certain thresholds.' - )}`, + ), }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Deriv (SVG) LLC (company no. 273 LLC 2020)')}`, + title: localize('Regulator/EDR'), + description: localize('Deriv (SVG) LLC (company no. 273 LLC 2020)'), }, ], synthetic_verification_docs: ['not_applicable'], diff --git a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-vanuatu-contents.ts b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-vanuatu-contents.ts index 77955f87afc2..92950a0fe37e 100644 --- a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-vanuatu-contents.ts +++ b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-vanuatu-contents.ts @@ -7,80 +7,80 @@ export const jurisdictionVanuatuContents = (): TJurisdictionCardItems => ({ synthetic_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Synthetics, Basket indices and Derived FX')}`, + title: localize('Assets'), + description: localize('Synthetics, Basket indices and Derived FX'), title_indicators: { type: 'displayText', - display_text: `${localize('40+')}`, + display_text: localize('40+'), display_text_skin_color: 'red-darker', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:1000')}`, + display_text: localize('1:1000'), display_text_skin_color: 'yellow-light', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Vanuatu Financial Services Commission')}`, + title: localize('Regulator/EDR'), + description: localize('Vanuatu Financial Services Commission'), }, ], financial_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Forex, Stock indices, Commodities and Cryptocurrencies')}`, + title: localize('Assets'), + description: localize('Forex, Stock indices, Commodities and Cryptocurrencies'), title_indicators: { type: 'displayText', - display_text: `${localize('90+')}`, + display_text: localize('90+'), display_text_skin_color: 'red-dark', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:1000')}`, + display_text: localize('1:1000'), display_text_skin_color: 'yellow-light', }, }, { key: 'spreadsFrom', - title: `${localize('Spreads from')}`, + title: localize('Spreads from'), title_indicators: { type: 'displayText', - display_text: `${localize('0.5 pips')}`, + display_text: localize('0.5 pips'), display_text_skin_color: 'violet-dark', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Vanuatu Financial Services Commission')}`, + title: localize('Regulator/EDR'), + description: localize('Vanuatu Financial Services Commission'), }, ], synthetic_verification_docs: ['selfie', 'identity_document', 'name_and_address'], diff --git a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-verification-contents.ts b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-verification-contents.ts index 5802061c09c4..00fb59980008 100644 --- a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-verification-contents.ts +++ b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction-verification-contents.ts @@ -8,25 +8,25 @@ type TJurisdictionVerificationContents = { }; export const jurisdictionVerificationContents = (): TJurisdictionVerificationContents => ({ - short_description: `${localize('We need you to submit these in order to get this account:')}`, + short_description: localize('We need you to submit these in order to get this account:'), required_verification_docs: { document_number: { icon: 'IcDocumentNumberVerification', - text: `${localize('Document number (identity card, passport)')}`, + text: localize('Document number (identity card, passport)'), }, selfie: { icon: 'IcSelfieVerification', - text: `${localize('A selfie of yourself.')}`, + text: localize('A selfie of yourself.'), }, identity_document: { icon: 'IcIdentityDocumentVerification', - text: `${localize('A copy of your identity document (identity card, passport)')}`, + text: localize('A copy of your identity document (identity card, passport)'), }, name_and_address: { icon: 'IcNameAndAddressVerification', - text: `${localize( + text: localize( 'A recent utility bill (electricity, water or gas) or recent bank statement or government-issued letter with your name and address.' - )}`, + ), }, not_applicable: { icon: 'IcNotApplicableVerification', @@ -36,14 +36,14 @@ export const jurisdictionVerificationContents = (): TJurisdictionVerificationCon status_references: [ { icon: 'IcVerificationStatusYellow', - text: `${localize('Your document is pending for verification.')}`, + text: localize('Your document is pending for verification.'), color: 'yellow', }, { icon: 'IcVerificationStatusRed', - text: `${localize('Verification failed. Resubmit during account creation.')}`, + text: localize('Verification failed. Resubmit during account creation.'), color: 'red', }, - { icon: 'IcVerificationStatusGreen', text: `${localize('Your document is verified.')}`, color: 'green' }, + { icon: 'IcVerificationStatusGreen', text: localize('Your document is verified.'), color: 'green' }, ], }); diff --git a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction_maltainvest_contents.ts b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction_maltainvest_contents.ts index 39b2d0d7d432..d713dd64d65f 100644 --- a/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction_maltainvest_contents.ts +++ b/packages/cfd/src/Constants/jurisdiction-contents/jurisdiction_maltainvest_contents.ts @@ -7,88 +7,88 @@ export const jurisdictionMaltainvestContents = (): TJurisdictionCardItems => ({ synthetic_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Synthetics, Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies')}`, + title: localize('Assets'), + description: localize('Synthetics, Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies'), title_indicators: { type: 'displayText', - display_text: `${localize('140+')}`, + display_text: localize('140+'), display_text_skin_color: 'red-light', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:30')}`, + display_text: localize('1:30'), display_text_skin_color: 'brown-dark', }, }, { key: 'spreadsFrom', - title: `${localize('Spreads from')}`, + title: localize('Spreads from'), title_indicators: { type: 'displayText', - display_text: `${localize('0.5 pips')}`, + display_text: localize('0.5 pips'), display_text_skin_color: 'violet-dark', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Malta Financial Services Authority (MFSA) (licence no. IS/70156)')}`, + title: localize('Regulator/EDR'), + description: localize('Malta Financial Services Authority (MFSA) (licence no. IS/70156)'), }, ], financial_contents: [ { key: 'assets', - title: `${localize('Assets')}`, - description: `${localize('Synthetics, Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies')}`, + title: localize('Assets'), + description: localize('Synthetics, Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies'), title_indicators: { type: 'displayText', - display_text: `${localize('140+')}`, + display_text: localize('140+'), display_text_skin_color: 'red-light', }, }, { key: 'leverage', - title: `${localize('Leverage')}`, + title: localize('Leverage'), title_indicators: { type: 'displayText', - display_text: `${localize('1:30')}`, + display_text: localize('1:30'), display_text_skin_color: 'brown-dark', }, }, { key: 'spreadsFrom', - title: `${localize('Spreads from')}`, + title: localize('Spreads from'), title_indicators: { type: 'displayText', - display_text: `${localize('0.5 pips')}`, + display_text: localize('0.5 pips'), display_text_skin_color: 'violet-dark', }, }, { key: 'verifications', - title: `${localize('Verifications')}`, + title: localize('Verifications'), title_indicators: { type: 'displayIcons' }, clickable_description: [ - { type: 'link', text: `${localize('Learn more')}` }, - { type: 'text', text: `${localize('about verifications needed.')}` }, + { type: 'link', text: localize('Learn more') }, + { type: 'text', text: localize('about verifications needed.') }, ], }, { key: 'regulator', - title: `${localize('Regulator/EDR')}`, - description: `${localize('Malta Financial Services Authority (MFSA) (licence no. IS/70156)')}`, + title: localize('Regulator/EDR'), + description: localize('Malta Financial Services Authority (MFSA) (licence no. IS/70156)'), }, ], synthetic_verification_docs: ['selfie', 'identity_document', 'name_and_address'],