@@ -50,10 +50,7 @@ const processData = (markets) => {
5050 submarket_names [ market . display_name ] = [ ] ;
5151 market . submarkets . forEach (
5252 ( submarket ) => {
53- if ( ! isRestrictedSymbol ( submarket . name ) ) {
54-
5553 submarket_names [ market . display_name ] . push ( submarket . display_name )
56- }
5754 }
5855 )
5956 } ) ;
@@ -152,18 +149,21 @@ const initTradingWin = ($html) => {
152149 const refresh = ( data ) => {
153150 const result = processData ( menu . extractFilteredMarkets ( data [ 0 ] ) ) ;
154151 const active_symbols = local_storage . get ( 'active_symbols' ) ;
155- let header = getObjectMarketSubmarkets ( active_symbols ) ;
156- const markets_sorted_list = getSortedMarkets ( active_symbols ) ;
152+ const filtered_symbols = filterRestrictedSymbols ( active_symbols )
153+ let header = getObjectMarketSubmarkets ( filtered_symbols ) ;
154+ const markets_sorted_list = getSortedMarkets ( filtered_symbols ) ;
157155
158156 if ( $ . isEmptyObject ( header ) ) return ;
159157
160158 function changed ( ) {
161159 const val = $ ( this ) . val ( ) ;
162- header = getObjectMarketSubmarkets ( local_storage . get ( 'active_symbols' ) ) ;
160+ const new_active_symbols = local_storage . get ( 'active_symbols' ) ;
161+ const new_filtered_symbols = filterRestrictedSymbols ( new_active_symbols )
162+ header = getObjectMarketSubmarkets ( new_filtered_symbols ) ;
163163
164164
165165 if ( header [ val ] ) {
166- const cumulative_submarkets = Object . keys ( header [ val ] ) . filter ( item => ! isRestrictedSymbol ( item ) )
166+ const cumulative_submarkets = Object . keys ( header [ val ] )
167167 submarket_names . update_list ( getSortedSubmarkets ( cumulative_submarkets ) )
168168 } ;
169169
0 commit comments