Skip to content

Commit

Permalink
Merge branch 'master' into sergei/88771/australian-vrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-deriv committed Feb 21, 2023
2 parents 630bab1 + 4a0a8dc commit 1fad9c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const selfExclusionArticleItems = ({ is_eu, is_uk, is_deriv_crypto, is_ap
className='link'
rel='noopener noreferrer'
target='_blank'
href={getStaticUrl('/contact-us', { is_deriv_crypto })}
href={getStaticUrl('/contact_us', { is_deriv_crypto })}
/>,
]}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ const AccountSwitcher = props => {

const can_manage_account =
!props.show_eu_related_content || (props.show_eu_related_content && props.can_change_fiat_currency);
const can_manage_account_virtual = props.is_virtual && can_manage_account;
const can_manage_account_virtual = props.is_virtual && can_manage_account && props.has_active_real_account;
const can_manage_account_multi = !canUpgrade() && canOpenMulti() && can_manage_account;

const have_more_accounts = type =>
Expand Down
9 changes: 4 additions & 5 deletions packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import moment from 'moment';
import { setDeviceDataCookie } from './Helpers/device';

const LANGUAGE_KEY = 'i18n_language';
const DEFAULT_LANGUAGE = 'EN';
const storage_key = 'client.accounts';
const store_name = 'client_store';
const eu_shortcode_regex = new RegExp('^(maltainvest|malta|iom)$');
Expand Down Expand Up @@ -409,13 +410,11 @@ export default class ClientStore extends BaseStore {
() => [this.account_settings],
() => {
const { trading_hub } = this.account_settings;
const lang_from_url = window.location.search.slice(-2);
const lang_from_url = new URLSearchParams(window.location.search).get('lang') || DEFAULT_LANGUAGE;
this.is_pre_appstore = !!trading_hub;
localStorage.setItem('is_pre_appstore', !!trading_hub);
if (lang_from_url) {
this.setPreferredLanguage(lang_from_url);
localStorage.setItem(LANGUAGE_KEY, lang_from_url);
}
this.setPreferredLanguage(lang_from_url);
LocalStore.set(LANGUAGE_KEY, lang_from_url);
}
);
// TODO: Remove this after setting trading_hub enabled for all users
Expand Down

0 comments on commit 1fad9c9

Please sign in to comment.