don't fail completely if one coin is down

This commit is contained in:
Josh Harvey 2016-05-21 19:13:25 +03:00
parent 29759fe132
commit aa4e471364
3 changed files with 12 additions and 27 deletions

View file

@ -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