Skip to content

Commit

Permalink
fix: eu user
Browse files Browse the repository at this point in the history
  • Loading branch information
amina-deriv committed Jun 14, 2023
1 parent 53fb56e commit 9ef52cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion packages/appstore/src/modules/traders-hub/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ const TradersHub = () => {
};
React.useEffect(() => {
if (is_eu_user) setTogglePlatformType('cfd');
if (!has_active_real_account && is_logged_in && is_from_signup_account && is_eu_user) {
if (
!has_active_real_account &&
is_logged_in &&
is_from_signup_account &&
content_flag === ContentFlag.EU_DEMO
) {
openRealAccountSignup('maltainvest');
setIsFromSignupAccount(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames';
import React from 'react';
import { withRouter } from 'react-router-dom';
import { Button, Text, Modal, DesktopWrapper, MobileDialog, MobileWrapper } from '@deriv/components';
import { routes } from '@deriv/shared';
import { ContentFlag, routes } from '@deriv/shared';
import { RiskToleranceWarningModal, TestWarningModal } from '@deriv/account';
import { localize, Localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
Expand Down Expand Up @@ -85,6 +85,7 @@ const WizardHeading = ({ country_standpoint, currency, is_isle_of_man_residence,
const RealAccountSignup = ({
available_crypto_currencies,
closeRealAccountSignup,
content_flag,
country_standpoint,
currency,
deposit_real_account_signup_target,
Expand Down Expand Up @@ -416,7 +417,7 @@ const RealAccountSignup = ({

if (modal_content[getActiveModalIndex()].action === 'signup') {
setIsClosingCreateRealAccountModal(true);
if (show_eu_related_content) {
if ([ContentFlag.EU_REAL, ContentFlag.EU_DEMO].includes(content_flag)) {
toggleIsTourOpen(true);
}

Expand Down Expand Up @@ -676,6 +677,7 @@ export default connect(({ ui, client, traders_hub, modules }) => ({
available_crypto_currencies: client.available_crypto_currencies,
cfd_score: client.cfd_score,
closeRealAccountSignup: ui.closeRealAccountSignup,
content_flag: traders_hub.content_flag,
country_standpoint: client.country_standpoint,
currency: client.currency,
deposit_real_account_signup_target: ui.deposit_real_account_signup_target,
Expand Down

0 comments on commit 9ef52cb

Please sign in to comment.