WIPP
This commit is contained in:
parent
7e5515a873
commit
b16d11045c
10 changed files with 368 additions and 550 deletions
|
|
@ -47,10 +47,11 @@ function buildRates (deviceId) {
|
|||
|
||||
function buildBalances (deviceId) {
|
||||
const cryptoCodes = plugins.getCryptoCodes(deviceId)
|
||||
|
||||
const fiatCode = plugins.getFiatCode(deviceId)
|
||||
const _balances = {}
|
||||
|
||||
cryptoCodes.forEach(cryptoCode => {
|
||||
const balanceRec = plugins.fiatBalance(cryptoCode, deviceId)
|
||||
const balanceRec = plugins.fiatBalance(fiatCode, 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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue