Add back wallet balance and ticker rate logging
This commit is contained in:
parent
e3e091b873
commit
1c1ed95c48
1 changed files with 6 additions and 1 deletions
|
|
@ -409,7 +409,8 @@ function stopTrader() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pollBalance(cb) {
|
function pollBalance(cb) {
|
||||||
|
logger.debug('collecting balance');
|
||||||
|
|
||||||
var jobs = {
|
var jobs = {
|
||||||
transferBalance: walletPlugin.balance
|
transferBalance: walletPlugin.balance
|
||||||
};
|
};
|
||||||
|
|
@ -426,6 +427,7 @@ function pollBalance(cb) {
|
||||||
return cb && cb(err);
|
return cb && cb(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug('Balance update:', balance);
|
||||||
balance.timestamp = Date.now();
|
balance.timestamp = Date.now();
|
||||||
lastBalances = balance;
|
lastBalances = balance;
|
||||||
|
|
||||||
|
|
@ -434,12 +436,15 @@ function pollBalance(cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pollRate(cb) {
|
function pollRate(cb) {
|
||||||
|
logger.debug('polling for rates (%s)', tickerPlugin.NAME);
|
||||||
|
|
||||||
tickerPlugin.ticker(deviceCurrency, function(err, resRates) {
|
tickerPlugin.ticker(deviceCurrency, function(err, resRates) {
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.error(err);
|
logger.error(err);
|
||||||
return cb && cb(err);
|
return cb && cb(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug('got rates: %j', resRates);
|
||||||
resRates.timestamp = new Date();
|
resRates.timestamp = new Date();
|
||||||
lastRates = resRates;
|
lastRates = resRates;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue