diff --git a/packages/appstore/src/components/cfds-listing/cfds-listing.scss b/packages/appstore/src/components/cfds-listing/cfds-listing.scss index bdb771bf157c..f310db271452 100644 --- a/packages/appstore/src/components/cfds-listing/cfds-listing.scss +++ b/packages/appstore/src/components/cfds-listing/cfds-listing.scss @@ -226,7 +226,7 @@ background: var(--brand-dark-grey); align-items: center; text-decoration: none; - padding: 0.2rem; + padding: 0.4rem; border-radius: $BORDER_RADIUS; &-text { @@ -237,6 +237,9 @@ white-space: nowrap; } } + &-icon { + padding-left: 0.6rem; + } } &__specs { padding: 1.6rem; @@ -292,6 +295,12 @@ padding-top: 2rem; padding-bottom: 5.8rem; + &-description { + display: flex; + justify-content: center; + margin-top: 1.4rem; + } + &-app { display: flex; flex-direction: column; diff --git a/packages/appstore/src/components/onboarding-new/static-dashboard.tsx b/packages/appstore/src/components/onboarding-new/static-dashboard.tsx index 178ee4878c19..01c9894fba00 100644 --- a/packages/appstore/src/components/onboarding-new/static-dashboard.tsx +++ b/packages/appstore/src/components/onboarding-new/static-dashboard.tsx @@ -64,7 +64,7 @@ const StaticDashboard = ({ loginid, }: TStaticDashboard) => { const { client, traders_hub } = useStores(); - const { content_flag } = traders_hub; + const { content_flag, CFDs_restricted_countries } = traders_hub; const { is_eu_country, is_logged_in } = client; //starting ctrader project @@ -436,7 +436,7 @@ const StaticDashboard = ({
- {!is_eu_user && ( + {!is_eu_user && !CFDs_restricted_countries && ( )} - {!is_eu_user && ( + {!is_eu_user && !CFDs_restricted_countries && ( - {!is_eu_user && ( + {!is_eu_user && !CFDs_restricted_countries && (
@@ -523,7 +523,7 @@ const StaticDashboard = ({
)} - {!is_eu_user && ( + {!is_eu_user && !CFDs_restricted_countries && (
; } } else if (platform === CFD_PLATFORMS.DERIVEZ) { - return ; + return ; } else if (traders_hub) { switch (type) { case 'synthetic': @@ -833,7 +833,12 @@ const CFDPasswordModal = ({ values={{ // TODO: remove below condition once deriv x changes are completed type: platform === 'dxtrade' && type_label === 'Derived' ? 'Synthetic' : type_label, - platform: platform === CFD_PLATFORMS.MT5 ? mt5_platform_label : 'Deriv X', + platform: + platform === CFD_PLATFORMS.MT5 + ? mt5_platform_label + : platform === CFD_PLATFORMS.DERIVEZ + ? 'Deriv Ez' + : 'Deriv X', category: category_label, jurisdiction_selected_shortcode: platform === CFD_PLATFORMS.MT5 && !show_eu_related_content ? jurisdiction_label : '', diff --git a/packages/cfd/src/Containers/trade-modal.tsx b/packages/cfd/src/Containers/trade-modal.tsx index 66ca7720cf8e..ee40301570ea 100644 --- a/packages/cfd/src/Containers/trade-modal.tsx +++ b/packages/cfd/src/Containers/trade-modal.tsx @@ -74,31 +74,23 @@ const TradeModal = ({
); }; - const downloadCenterAppOption = (account_type: TCFDsPlatformType) => { - if (account_type === 'dxtrade') { + const downloadCenterAppOption = (platform_type: TCFDsPlatformType) => { + if (platform_type === 'dxtrade') { return (
{localize('Run Deriv X on your browser')} - +
); - } else if (account_type === 'derivez') { + } else if (platform_type === 'derivez') { return (
{localize('Run Deriv EZ on your browser')} - +
); } @@ -162,7 +154,9 @@ const TradeModal = ({ className='cfd-trade-modal__maintenance-icon' />
- + + +
diff --git a/packages/cfd/src/Stores/Modules/CFD/cfd-store.js b/packages/cfd/src/Stores/Modules/CFD/cfd-store.js index 77942b438e76..7cdcaa793948 100644 --- a/packages/cfd/src/Stores/Modules/CFD/cfd-store.js +++ b/packages/cfd/src/Stores/Modules/CFD/cfd-store.js @@ -319,7 +319,6 @@ export default class CFDStore extends BaseStore { password: CFD_PLATFORMS.DXTRADE ? values.password : '', platform: values.platform, account_type: this.account_type.category, - // market_type: this.account_type.type === 'dxtrade' ? 'all' : this.account_type.type, market_type: this.account_type.type === 'dxtrade' || this.account_type.type === 'derivez' ? 'all' diff --git a/packages/cfd/src/sass/cfd-dashboard.scss b/packages/cfd/src/sass/cfd-dashboard.scss index 2683d464b9e5..e7bdfac3bd33 100644 --- a/packages/cfd/src/sass/cfd-dashboard.scss +++ b/packages/cfd/src/sass/cfd-dashboard.scss @@ -236,7 +236,7 @@ } } - &-dxtrade-button { + &__dxtrade-button { background: $color-black-7; border-radius: $BORDER_RADIUS; text-decoration: none; @@ -255,7 +255,7 @@ padding: 0.4rem 0rem 0.4rem 0.2rem; } &-icon { - margin-left: 0.6rem; + padding-left: 0.6rem; } } @@ -1254,6 +1254,12 @@ padding-top: 2rem; padding-bottom: 5.8rem; + &-description { + display: flex; + justify-content: center; + margin-top: 1.4rem; + } + &-app { display: flex; flex-direction: column; diff --git a/packages/components/src/components/icon/brand/ic-brand-derivez.svg b/packages/components/src/components/icon/brand/ic-brand-derivez.svg deleted file mode 100644 index aba5315db1a0..000000000000 --- a/packages/components/src/components/icon/brand/ic-brand-derivez.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/components/src/components/icon/common/ic-windows-logo.svg b/packages/components/src/components/icon/common/ic-windows-logo.svg index 2940557478c9..3dc0238141e7 100644 --- a/packages/components/src/components/icon/common/ic-windows-logo.svg +++ b/packages/components/src/components/icon/common/ic-windows-logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/components/src/components/icon/icons.js b/packages/components/src/components/icon/icons.js index 3e9e22133007..64400e4612a1 100644 --- a/packages/components/src/components/icon/icons.js +++ b/packages/components/src/components/icon/icons.js @@ -58,7 +58,6 @@ import './brand/ic-brand-deriv-apps.svg'; import './brand/ic-brand-deriv-ez-wordmark.svg'; import './brand/ic-brand-deriv-ez.svg'; import './brand/ic-brand-deriv.svg'; -import './brand/ic-brand-derivez.svg'; import './brand/ic-brand-derivgo.svg'; import './brand/ic-brand-dmt5-financial-stp.svg'; import './brand/ic-brand-dmt5-financial.svg'; diff --git a/packages/components/stories/icon/icons.js b/packages/components/stories/icon/icons.js index 5e1fe5b3c84e..73ad2c7ffcac 100644 --- a/packages/components/stories/icon/icons.js +++ b/packages/components/stories/icon/icons.js @@ -63,7 +63,6 @@ export const icons = 'IcBrandDerivEzWordmark', 'IcBrandDerivEz', 'IcBrandDeriv', - 'IcBrandDerivez', 'IcBrandDerivgo', 'IcBrandDmt5FinancialStp', 'IcBrandDmt5Financial', diff --git a/packages/core/src/Stores/client-store.js b/packages/core/src/Stores/client-store.js index 7b6f62a606fe..36466f9b50e4 100644 --- a/packages/core/src/Stores/client-store.js +++ b/packages/core/src/Stores/client-store.js @@ -624,15 +624,20 @@ export default class ClientStore extends BaseStore { hasAccountErrorInCFDList = (platform, account_type) => { if (!this.is_logged_in) return false; - - const list = - platform === CFD_PLATFORMS.MT5 - ? this.mt5_login_list - : platform === CFD_PLATFORMS.DXTRADE - ? this.dxtrade_accounts_list - : platform === CFD_PLATFORMS.DERIVEZ - ? this.derivez_accounts_list - : ''; + let list; + switch (platform) { + case 'mt5': + list = this.mt5_login_list; + break; + case 'dxtrade': + list = this.dxtrade_accounts_list; + break; + case 'derivez': + list = this.derivez_accounts_list; + break; + default: + return false; + } return list?.some(account => !!account.has_error && account.account_type === account_type); }; @@ -1287,6 +1292,7 @@ export default class ClientStore extends BaseStore { if (this.is_logged_in && !has_client_accounts) { localStorage.setItem(storage_key, JSON.stringify(this.accounts)); LocalStore.set(storage_key, JSON.stringify(this.accounts)); + this.syncWithLegacyPlatforms(client_id, this.accounts); } try { @@ -1312,6 +1318,7 @@ export default class ClientStore extends BaseStore { this.setAccountSettings(get_settings_response.get_settings); resolve(); }); + this.syncWithLegacyPlatforms(client_id, client_accounts); }) .catch(error => { // eslint-disable-next-line no-console @@ -1652,8 +1659,6 @@ export default class ClientStore extends BaseStore { WS.tradingPlatformAccountsList(CFD_PLATFORMS.DERIVEZ).then(this.responseTradingPlatformAccountsList); WS.tradingPlatformAccountsList(CFD_PLATFORMS.DERIVEZ).then(this.responseDerivezAvailableAccounts); - WS.tradingServers(CFD_PLATFORMS.DXTRADE).then(this.responseDxtradeTradingServers); - this.responseStatement( await BinarySocket.send({ statement: 1, diff --git a/packages/core/src/Stores/traders-hub-store.js b/packages/core/src/Stores/traders-hub-store.js index b048a115b2bc..0953f09366cb 100644 --- a/packages/core/src/Stores/traders-hub-store.js +++ b/packages/core/src/Stores/traders-hub-store.js @@ -15,19 +15,14 @@ export default class TradersHubStore extends BaseStore { selected_account_type; selected_region; is_onboarding_visited = false; - is_balance_calculating = false; is_failed_verification_modal_visible = false; is_regulators_compare_modal_visible = false; is_tour_open = false; is_account_type_modal_visible = false; account_type_card = ''; selected_platform_type = 'options'; - active_index = 0; + active_indx = 0; open_failed_verification_for = ''; - platform_demo_balance = { balance: 0, currency: 'USD' }; - platform_real_balance = { balance: 0, currency: 'USD' }; - cfd_demo_balance = { balance: 0, currency: 'USD' }; - cfd_real_balance = { balance: 0, currency: 'USD' }; modal_data = { active_modal: '', data: {}, @@ -45,15 +40,11 @@ export default class TradersHubStore extends BaseStore { available_derivez_accounts: observable, available_mt5_accounts: observable, available_platforms: observable, - cfd_demo_balance: observable, - cfd_real_balance: observable, combined_cfd_mt5_accounts: observable, is_account_transfer_modal_open: observable, is_account_type_modal_visible: observable, is_regulators_compare_modal_visible: observable, is_failed_verification_modal_visible: observable, - platform_demo_balance: observable, - platform_real_balance: observable, is_tour_open: observable, modal_data: observable, is_onboarding_visited: observable, @@ -530,7 +521,6 @@ export default class TradersHubStore extends BaseStore { if (is_eu && !has_maltainvest_account && standpoint?.iom) { openAccountNeededModal('maltainvest', localize('Deriv Multipliers'), localize('demo CFDs')); - } else if (platform !== CFD_PLATFORMS.DERIVEZ) { enableCFDPasswordModal(); } else {