fix insufficient deposit

This commit is contained in:
Josh Harvey 2014-11-28 12:01:03 -05:00
parent 209272eb26
commit 5c82d2ad95
3 changed files with 11 additions and 11 deletions

View file

@ -14,6 +14,7 @@ var PENDING_TIMEOUT = 70 * 1000;
// TODO: might have to update this if user is allowed to extend monitoring time
var DEPOSIT_TIMEOUT = 120 * 1000;
var db = null;
var tickerPlugin = null;
@ -426,7 +427,6 @@ function stopTrader() {
}
function pollBalance(cb) {
logger.debug('collecting balance');
var jobs = {
transferBalance: walletPlugin.balance
@ -444,7 +444,6 @@ function pollBalance(cb) {
return cb && cb(err);
}
logger.debug('Balance update:', balance);
balance.timestamp = Date.now();
lastBalances = balance;
@ -453,15 +452,12 @@ function pollBalance(cb) {
}
function pollRate(cb) {
logger.debug('polling for rates (%s)', tickerPlugin.NAME);
tickerPlugin.ticker(deviceCurrency, function(err, resRates) {
if (err) {
logger.error(err);
return cb && cb(err);
}
logger.debug('got rates: %j', resRates);
resRates.timestamp = new Date();
lastRates = resRates;