This commit is contained in:
Josh Harvey 2016-11-23 13:18:35 +02:00
parent d9f64fd4d3
commit dc923829e3
2 changed files with 12 additions and 11 deletions

View file

@ -54,6 +54,7 @@ function buildBalances (deviceId) {
const balanceRec = plugins.fiatBalance(cryptoCode, deviceId)
if (!balanceRec) return logger.warn('No balance for ' + cryptoCode + ' yet')
if (Date.now() - balanceRec.timestamp > STALE_BALANCE) return logger.warn('Stale balance for ' + cryptoCode)
_balances[cryptoCode] = balanceRec.balance
})
@ -102,7 +103,7 @@ function poll (req, res) {
reboot,
rates,
balances,
coins: config.currencies.cryptos
coins: config.currencies.cryptoCurrencies
}
if (response.idVerificationEnabled) {