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

Commit e550976

Browse files
filter_markets_with_regex
1 parent ecf4175 commit e550976

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/navigation/menu.es6

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

5252
export const refreshMenu = (root, markets, callback) => {
53-
const non_crypto_markets = markets.filter( m => m.name !== "cryptocurrency" && m.name !== "Cryptocurrencies")
53+
const non_crypto = symbol => !/^(cry|JD)/i.test(symbol);
54+
const non_crypto_markets = markets.filter( m => non_crypto(m.name))
55+
5456
const menu = `<ul>${
5557
non_crypto_markets.map(m => `<li><div>${m.display_name}</div><ul>${
5658
m.submarkets.map(s => `<li><div>${s.display_name}</div><ul>${

0 commit comments

Comments
 (0)