don't fail completely if one coin is down
This commit is contained in:
parent
29759fe132
commit
aa4e471364
3 changed files with 12 additions and 27 deletions
|
|
@ -589,7 +589,7 @@ function pollRate (cryptoCode, cb) {
|
|||
return cb && cb(err)
|
||||
}
|
||||
|
||||
resRates.timestamp = new Date()
|
||||
resRates.timestamp = Date.now()
|
||||
var rates = resRates[deviceCurrency].rates
|
||||
if (rates) {
|
||||
rates.ask = rates.ask && new BigNumber(rates.ask)
|
||||
|
|
@ -608,8 +608,6 @@ function pollRate (cryptoCode, cb) {
|
|||
*/
|
||||
|
||||
exports.getDeviceRate = function getDeviceRate (cryptoCode) {
|
||||
if (!lastRates[cryptoCode]) return null
|
||||
|
||||
var lastRate = lastRates[cryptoCode]
|
||||
if (!lastRate) return null
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue