-
Notifications
You must be signed in to change notification settings - Fork 146
Mahdiyeh/fix: remove symbol filtering in webtrader #1554
base: master
Are you sure you want to change the base?
Mahdiyeh/fix: remove symbol filtering in webtrader #1554
Conversation
src/common/util.js
Outdated
function filterRestrictedSymbols(active_symbols) { | ||
return active_symbols.filter(function(item) { return !/^(BOOM|CRASH|STP).+/i.test(item.symbol)}); | ||
return active_symbols; | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
src/instruments/instruments.es6
Outdated
const active_markets = _(data.active_symbols).groupBy('market').map(function(activeSymbols) { | ||
|
||
const sym = _.head(activeSymbols); | ||
|
||
const market = { name: sym.market, display_name: sym.market_display_name }; | ||
market.submarkets = _(filtered_symbols).groupBy('submarket').map(function(symbols) { | ||
market.submarkets = _(activeSymbols).groupBy('submarket').map(function(symbols) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename activeSymbols
to a snake_case variable name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have active_symbols already, so I renamed it to all_symbols
src/trade/tradeMenu.es6
Outdated
let markets = _(data.active_symbols).groupBy('market').map((symbols) => { | ||
const filtered_symbols = filterRestrictedSymbols(symbols); | ||
const sym = _.head(filtered_symbols); | ||
let markets = _(data.active_symbols).groupBy('market').map((activSymbols) => { | ||
const sym = _.head(activSymbols); | ||
const market = { name: sym.market, display_name: sym.market_display_name }; | ||
market.submarkets = _(filtered_symbols).groupBy('submarket').map((symbols) => { | ||
market.submarkets = _(activSymbols).groupBy('submarket').map((symbols) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to a snake_case variable name and fix the typo in word active
No description provided.