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

Conversation

mahdiyeh-deriv
Copy link
Contributor

No description provided.

Comment on lines 1 to 3
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

Comment on lines 16 to 21
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) {
Copy link
Contributor

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

Copy link
Contributor Author

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

Comment on lines 17 to 20
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) => {
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants