Skip to content

Commit

Permalink
cleaned up examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jul 26, 2017
1 parent 18692dc commit 51056a6
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions examples/js/proxy-round-robin.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,10 @@ process.on ('unhandledRejection', e => { log.bright.red.error (e); process.exit
//-----------------------------------------------------------------------------

let loadMarket = async market => {
let products = await market.loadProducts ()
let symbols = [
'BTC/USD',
'BTC/CNY',
'BTC/EUR',
'BTC/ETH',
'ETH/BTC',
'BTC/JPY',
'LTC/BTC',
'ETH/EUR',
'ETH/JPY',
'ETH/CNY',
'LTC/CNY',
'DASH/BTC',
'DOGE/BTC',
]
let result = market.symbols.filter (symbol => symbols.indexOf (symbol) >= 0)
if (result.length > 0)
if (market.symbols.length > result.length)
result = result.join (', ') + ' + more...'
else
result = result.join (', ')

log (market.id.green, 'loaded', market.symbols.length.toString ().bright.green, 'symbols', (market.proxy ? market.proxy : '_').blue)
await market.loadProducts ()
log (market.id.green, 'loaded',
market.symbols.length.toString ().bright.green, 'symbols',
(market.proxy ? market.proxy : '_').blue)
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit 51056a6

Please sign in to comment.