add wallet balance poll debug
This commit is contained in:
parent
bc6aaad41a
commit
50979a6c54
3 changed files with 11 additions and 3 deletions
|
|
@ -5,8 +5,10 @@ const HKDF = require('node-hkdf-sync')
|
|||
const configManager = require('./config-manager')
|
||||
const pify = require('pify')
|
||||
const fs = pify(require('fs'))
|
||||
|
||||
const options = require('./options')
|
||||
const ph = require('./plugin-helper')
|
||||
const logger = require('./logger')
|
||||
|
||||
const FETCH_INTERVAL = 5000
|
||||
const INSUFFICIENT_FUNDS_CODE = 570
|
||||
|
|
@ -41,6 +43,7 @@ function fetchWallet (settings, cryptoCode) {
|
|||
const lastBalance = {}
|
||||
|
||||
function _balance (settings, cryptoCode) {
|
||||
logger.debug('Polled wallet balance')
|
||||
return fetchWallet(settings, cryptoCode)
|
||||
.then(r => r.wallet.balance(r.account, cryptoCode))
|
||||
.then(balance => ({balance, timestamp: Date.now()}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue