Skip to content

Commit

Permalink
Merge branch 'feature/82781/diel' of github.com:matin-binary/deriv-ap…
Browse files Browse the repository at this point in the history
…p into Hirad/82846/MT5-Account-Type-Modal
  • Loading branch information
hirad-deriv committed Dec 20, 2022
2 parents 5688ad0 + 6e194ee commit 08716af
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 12 deletions.
8 changes: 5 additions & 3 deletions packages/appstore/src/components/cfds-listing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ const CFDsListing = () => {
/>
);
})}
<div className='cfd-full-row'>
<hr className='divider' />
</div>
{!is_eu_user && (
<div className='cfd-full-row'>
<hr className='divider' />
</div>
)}
{available_dxtrade_accounts?.length > 0 && (
<div className='cfd-full-row'>
<Text size='xs' line_height='m' weight='bold'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.6rem 4.8rem;
padding-top: 2rem;

@include mobile {
display: flex;
Expand All @@ -46,6 +47,14 @@
}
}

.full-row {
width: 100%;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-column: 1 / span 3;
gap: 1.6rem 4.8rem;
}

.cfd-full-row {
display: grid;
width: 100%;
Expand Down
7 changes: 4 additions & 3 deletions packages/appstore/src/components/main-title-bar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import { observer } from 'mobx-react-lite';
import { useStores } from 'Stores/index';

const MainTitleBar = () => {
const { traders_hub } = useStores();
const { traders_hub, client } = useStores();
const { active_index, handleTabItemClick, selected_account_type, toggleRegulatorsCompareModal } = traders_hub;
const { is_eu } = client;
const is_real = selected_account_type === 'real';

return (
Expand All @@ -23,7 +24,7 @@ const MainTitleBar = () => {
</Text>
<AccountTypeDropdown />
</div>
{is_real && <RegulatorSwitcher />}
{is_real && !is_eu && <RegulatorSwitcher />}
<AssetSummary />
</div>
</DesktopWrapper>
Expand All @@ -33,7 +34,7 @@ const MainTitleBar = () => {
<div className='main-title-bar-mobile--account-type-dropdown'>
<AccountTypeDropdown />
</div>
{is_real ? (
{is_real && !is_eu ? (
<div className='main-title-bar-mobile--regulator'>
<div
className='main-title-bar-mobile--regulator--compare-modal'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ const OptionsAndMultipliersListing = () => {
>
{!is_demo && !has_any_real_account && (
<div className='full-row'>
<TradingAppCard name={localize('Deriv account')} icon='Options' availability='All' type='get' />
<TradingAppCard
name={localize('Deriv account')}
description={localize('Get a real Deriv account, start trading and manage your funds')}
icon='Options'
availability='All'
type='get'
/>
</div>
)}
{available_platforms.map((available_platform: BrandConfig) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import { Localize } from '@deriv/translations';
import { useStore } from '@deriv/stores';
import './virtual.scss';

const Virtual = () => {
type TVirtual = {
is_pre_appstore: boolean;
};

const Virtual = ({ is_pre_appstore }: TVirtual) => {
const {
client: { is_pre_appstore },
ui: { is_dark_mode_on, toggleAccountsDialog },
} = useStore();
const history = useHistory();
Expand Down
3 changes: 2 additions & 1 deletion packages/cashier/src/pages/deposit/deposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const Deposit = ({ setSideNotes }: TDeposit) => {
is_switching,
is_virtual,
landing_company_shortcode,
is_pre_appstore,
} = client;
const { cashier } = modules;
const { iframe, deposit, transaction_history, general_store } = cashier;
Expand Down Expand Up @@ -96,7 +97,7 @@ const Deposit = ({ setSideNotes }: TDeposit) => {
return <Loading is_fullscreen />;
}
if (is_virtual) {
return <Virtual />;
return <Virtual is_pre_appstore={is_pre_appstore} />;
}
if (is_system_maintenance) {
if (is_cashier_locked || (is_deposit_locked && current_currency_type === 'crypto')) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/Stores/traders-hub-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class TradersHubStore extends BaseStore {

getAvailablePlatforms() {
const appstore_platforms = getAppstorePlatforms();
if (this.selected_region === 'EU') {
if (this.root_store.client.is_eu || this.selected_region === 'EU') {
this.available_platforms = appstore_platforms.filter(platform =>
['EU', 'All'].some(region => region === platform.availability)
);
Expand Down Expand Up @@ -226,7 +226,7 @@ export default class TradersHubStore extends BaseStore {
return this.selected_account_type === 'demo';
}
get is_eu_user() {
return this.root_store.client.isEuropeCountry() || this.selected_region === 'EU';
return this.selected_region === 'EU';
}
setActiveIndex(active_index) {
this.active_index = active_index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

&--onboarding {
padding: 2.5rem;
cursor: pointer;

@include mobile {
padding: 1rem;
Expand Down

0 comments on commit 08716af

Please sign in to comment.