Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 03df5a7

Browse files
use_gaming_company_shortcode_to_filter_markets
1 parent 05b8548 commit 03df5a7

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/javascript/_common/base/client_base.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,6 @@ const ClientBase = (() => {
403403
return options_blocked_countries.includes(country);
404404
};
405405

406-
const isMalta = () => {
407-
const malta_countries = ['at', 'be', 'bg', 'cy', 'cz', 'dk', 'ee', 'fi', 'hr', 'hu', 'ie', 'lt', 'lv', 'nl', 'pl', 'pt', 'ro', 'se', 'si', 'sk'];
408-
const country = State.getResponse('authorize.country');
409-
410-
return malta_countries.includes(country);
411-
};
412-
413406
return {
414407
init,
415408
isLoggedIn,
@@ -440,7 +433,6 @@ const ClientBase = (() => {
440433
canTransferFunds,
441434
hasSvgAccount,
442435
canChangeCurrency,
443-
isMalta,
444436
};
445437
})();
446438

src/javascript/app/pages/trade/markets.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Markets extends React.Component {
7373
let market_symbol = Defaults.get('market');
7474
let final_markets_arr,
7575
final_market_obj;
76-
76+
7777
const market_list = Symbols.markets();
7878
this.markets = getAvailableUnderlyings(market_list);
7979

@@ -86,8 +86,9 @@ class Markets extends React.Component {
8686
const is_not_crypto = symbol => !/^(cry|JD)/i.test(symbol);
8787
const is_synthetic = symbol => /^(synthetic)/i.test(symbol);
8888
const is_uk = State.getResponse('authorize.country') === 'gb';
89+
const is_malta = State.getResponse('landing_company.gaming_company.shortcode') === 'malta';
8990
const market_arr = Object.entries(this.markets).sort((a, b) => sortSubmarket(a[0], b[0]));
90-
if ((Client.isMalta() || is_uk) && Client.getAccountOfType('virtual')) {
91+
if ((is_malta || is_uk) && Client.getAccountOfType('virtual')) {
9192
final_markets_arr = market_arr.filter(market => is_synthetic(market));
9293
final_market_obj = Object.fromEntries(final_markets_arr);
9394
market_symbol = Object.keys(final_market_obj)[0];

src/javascript/app/pages/trade/tradepage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const TradePage = (() => {
2323
const onLoad = () => {
2424
DerivBanner.onLoad();
2525

26-
BinarySocket.wait('authorize').then(() => {
26+
BinarySocket.wait('authorize' , 'landing_company').then(() => {
2727
init();
2828
});
2929
};

0 commit comments

Comments
 (0)