Skip to content

Commit

Permalink
fix: hide trade button in eu if user has no account
Browse files Browse the repository at this point in the history
  • Loading branch information
thisyahlen-deriv committed Jan 10, 2023
1 parent 6cb7890 commit b390b34
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const OptionsAndMultipliersListing = () => {
is_demo,
content_flag,
} = traders_hub;
const { is_landing_company_loaded, is_eu } = client;
const { is_landing_company_loaded, is_eu, has_maltainvest_account } = client;

const low_risk_cr_non_eu = content_flag === ContentFlag.LOW_RISK_CR_NON_EU;

Expand Down Expand Up @@ -99,7 +99,11 @@ const OptionsAndMultipliersListing = () => {
<TradingAppCard
key={`trading_app_card_${available_platform.name}`}
{...available_platform}
type={is_demo || has_any_real_account ? 'trade' : 'none'}
type={
is_demo || (has_any_real_account && !is_eu_user) || (has_maltainvest_account && is_eu_user)
? 'trade'
: 'none'
}
is_deriv_platform
has_divider={(!is_eu_user || is_demo) && getHasDivider(index, available_platforms.length, 3)}
/>
Expand Down

0 comments on commit b390b34

Please sign in to comment.