Skip to content

Commit

Permalink
Changes as part of #6 needed after grunt run which identified syntax …
Browse files Browse the repository at this point in the history
…issues
  • Loading branch information
Gerard Moroney committed Jan 3, 2018
1 parent d73628c commit bd23ab9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ function main () {
// Loop through config for BITSTAMP & connect, transform and create Redis pub/sub
if ( exchange_name == 'BITSTAMP' && exchange_active == 'Y' )
{
for( var p = 0; p < exchange_symbol_array.length; p++)
for( var q = 0; q < exchange_symbol_array.length; q++)
{
exchange_symbol = exchange_symbol_array[p].symbol;
exchange_symbol = exchange_symbol_array[q].symbol;
console.log(exchange_name, exchange_wss, exchange_symbol);
exFn.processBITSTAMP(client, exchange_name, exchange_wss, exchange_symbol);
}
Expand All @@ -108,9 +108,9 @@ function main () {
// Loop through config for BITSTAMP & connect, transform and create Redis pub/sub
if ( exchange_name == 'BINANCE' && exchange_active == 'Y' )
{
for( var p = 0; p < exchange_symbol_array.length; p++)
for( var r = 0; r < exchange_symbol_array.length; r++)
{
exchange_symbol = exchange_symbol_array[p].symbol;
exchange_symbol = exchange_symbol_array[r].symbol;
console.log(exchange_name, exchange_wss, exchange_symbol);
exFn.processBINANCE(client, exchange_name, exchange_wss, exchange_symbol);
}
Expand All @@ -119,15 +119,15 @@ function main () {
// Loop through config for BITTREX & connect, transform and create Redis pub/sub
if ( exchange_name == 'BITTREX' && exchange_active == 'Y')
{
for( var q = 0; q < exchange_symbol_array.length; q++)
for( var s = 0; s < exchange_symbol_array.length; s++)
{
// concatenate all of the symbols together because thats the way this API works for some reason
if ( q == 0 ) {
exchange_symbol = "\'" + exchange_symbol_array[q].symbol + "\'" ;
if ( s == 0 ) {
exchange_symbol = "\'" + exchange_symbol_array[s].symbol + "\'" ;
} else {
exchange_symbol = exchange_symbol + "," + "\'" + exchange_symbol_array[q].symbol + "\'";
exchange_symbol = exchange_symbol + "," + "\'" + exchange_symbol_array[s].symbol + "\'";
}
if ( q == ( exchange_symbol_array.length - 1) )
if ( s == ( exchange_symbol_array.length - 1) )
{
console.log(exchange_name, exchange_wss, exchange_symbol);
exFn.processBITTREX(client, exchange_name, exchange_wss, exchange_symbol);
Expand Down

0 comments on commit bd23ab9

Please sign in to comment.