Skip to content

Commit 9050ea9

Browse files
committed
chore: reduced lines of code
1 parent 8bf8d22 commit 9050ea9

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

packages/core/src/Stores/traders-hub-store.js

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -857,33 +857,21 @@ export default class TradersHubStore extends BaseStore {
857857
} else {
858858
this.combined_cfd_mt5_accounts = [
859859
...this.combined_cfd_mt5_accounts,
860-
this.is_eu_user
861-
? {
862-
// This is for backward compatibility
863-
// before BE change, EU market_type is financial. With BE change, EU market_type becomes standard
864-
icon: account.market_type === 'synthetic' ? 'Standard' : account.icon,
865-
name: account.market_type === 'synthetic' ? 'Standard' : account.name,
866-
platform: account.platform,
867-
description: account.description,
868-
key: `trading_app_card_${account.name}`,
869-
action_type: 'get',
870-
availability: this.selected_region,
871-
market_type: account.market_type,
872-
product: account.product,
873-
tracking_name: account.tracking_name,
874-
}
875-
: {
876-
icon: account.icon,
877-
name: account.name,
878-
platform: account.platform,
879-
description: account.description,
880-
key: `trading_app_card_${account.name}`,
881-
action_type: 'get',
882-
availability: this.selected_region,
883-
market_type: account.market_type,
884-
product: account.product,
885-
tracking_name: account.tracking_name,
886-
},
860+
861+
{
862+
// This is for backward compatibility
863+
// before BE change, EU market_type is financial. With BE change, EU market_type becomes synthetic
864+
icon: this.is_eu_user && account.market_type === 'synthetic' ? 'Standard' : account.icon,
865+
name: this.is_eu_user && account.market_type === 'synthetic' ? 'Standard' : account.name,
866+
platform: account.platform,
867+
description: account.description,
868+
key: `trading_app_card_${account.name}`,
869+
action_type: 'get',
870+
availability: this.selected_region,
871+
market_type: account.market_type,
872+
product: account.product,
873+
tracking_name: account.tracking_name,
874+
},
887875
];
888876
}
889877
});

0 commit comments

Comments
 (0)