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

Mahdiyeh/fix: remove symbol filtering in webtrader #1554

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function filterRestrictedSymbols(active_symbols) {
return active_symbols.filter(function(item) { return !/^(BOOM|CRASH|STP).+/i.test(item.symbol)});
return active_symbols;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible to remove the method and its usages across app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, since we do not need any symbol filtering we can remove the method, I will do it


function isTick(ohlc) {
Expand Down
5 changes: 1 addition & 4 deletions src/navigation/menu.es6
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ export const extractChartableMarkets = (trading_times_data) => {
};

export const refreshMenu = (root, markets, callback) => {
const is_not_crypto = symbol => !/^(cry|JD)/i.test(symbol);
const non_crypto_markets = markets.filter( m => is_not_crypto(m.name))

const menu = `<ul>${
non_crypto_markets.map(m => `<li><div>${m.display_name}</div><ul>${
markets.map(m => `<li><div>${m.display_name}</div><ul>${
m.submarkets.map(s => `<li><div>${s.display_name}</div><ul>${
s.instruments.map(i => `<li symbol='${i.symbol}' pip='${i.pip}'><div>${i.display_name}</div></li>`).join('')
}</ul></li>`).join('')
Expand Down