From fb4652ad0a24ac0134096f5f1124740f7418e7ab Mon Sep 17 00:00:00 2001 From: Yashim Wong Date: Tue, 28 Feb 2023 14:22:16 +0800 Subject: [PATCH] yashim/fix: translations (#7754) --- .../appstore/src/components/CFDs/cfd-real-accounts.tsx | 1 + packages/core/src/Stores/traders-hub-store.js | 10 ++-------- .../shared/src/utils/cfd/available-cfd-accounts.ts | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx b/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx index 3e59a5767006..15adbe058345 100644 --- a/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx +++ b/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx @@ -42,6 +42,7 @@ const CFDRealAccounts = ({ 'Trade CFDs on MT5 with forex, stocks, stock indices, synthetics, cryptocurrencies, and commodities.' ) : localize('Trade CFDs on MT5 with forex, stocks, stock indices, commodities, and cryptocurrencies.'); + const available_real_accounts: TStaticAccountProps[] = [ { name: 'Derived', diff --git a/packages/core/src/Stores/traders-hub-store.js b/packages/core/src/Stores/traders-hub-store.js index 9a48792a3c1f..93df982f75ff 100644 --- a/packages/core/src/Stores/traders-hub-store.js +++ b/packages/core/src/Stores/traders-hub-store.js @@ -1,11 +1,5 @@ import { action, makeObservable, observable, reaction, computed, runInAction } from 'mobx'; -import { - available_traders_hub_cfd_accounts, - CFD_PLATFORMS, - ContentFlag, - formatMoney, - getAppstorePlatforms, -} from '@deriv/shared'; +import { getCFDAvailableAccount, CFD_PLATFORMS, ContentFlag, formatMoney, getAppstorePlatforms } from '@deriv/shared'; import BaseStore from './base-store'; import { localize } from '@deriv/translations'; import { isEuCountry } from '_common/utility'; @@ -365,7 +359,7 @@ export default class TradersHubStore extends BaseStore { ); const all_available_accounts = [ - ...available_traders_hub_cfd_accounts, + ...getCFDAvailableAccount(), { name: !this.is_eu_user || this.is_demo_low_risk ? localize('Financial') : localize('CFDs'), description: account_desc, diff --git a/packages/shared/src/utils/cfd/available-cfd-accounts.ts b/packages/shared/src/utils/cfd/available-cfd-accounts.ts index 6664185f8f77..ed42b829faaa 100644 --- a/packages/shared/src/utils/cfd/available-cfd-accounts.ts +++ b/packages/shared/src/utils/cfd/available-cfd-accounts.ts @@ -13,7 +13,7 @@ export interface AvailableAccount { link_to?: string; } -export const available_traders_hub_cfd_accounts: AvailableAccount[] = [ +export const getCFDAvailableAccount = () => [ { name: 'Derived', description: localize('Trade CFDs on MT5 with synthetics, baskets, and derived FX.'),