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

Commit 37adaf4

Browse files
Merge pull request #1547 from mahdiyeh-fs/remove_cryptocurrency_market
Mahdiyeh/ remove_cryptocurrency_market
2 parents b5bb163 + 4fdd82c commit 37adaf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/navigation/menu.es6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ export const extractChartableMarkets = (trading_times_data) => {
5050
};
5151

5252
export const refreshMenu = (root, markets, callback) => {
53+
const is_not_crypto = symbol => !/^(cry|JD)/i.test(symbol);
54+
const non_crypto_markets = markets.filter( m => is_not_crypto(m.name))
55+
5356
const menu = `<ul>${
54-
markets.map(m => `<li><div>${m.display_name}</div><ul>${
57+
non_crypto_markets.map(m => `<li><div>${m.display_name}</div><ul>${
5558
m.submarkets.map(s => `<li><div>${s.display_name}</div><ul>${
5659
s.instruments.map(i => `<li symbol='${i.symbol}' pip='${i.pip}'><div>${i.display_name}</div></li>`).join('')
5760
}</ul></li>`).join('')

0 commit comments

Comments
 (0)