bill-reporting WIP
This commit is contained in:
parent
3befd4cd94
commit
8c50444e80
2 changed files with 24 additions and 1 deletions
|
|
@ -196,6 +196,10 @@ Trader.prototype.sendBitcoins = function (deviceFingerprint, tx, cb) {
|
|||
};
|
||||
|
||||
Trader.prototype.trade = function (rec, deviceFingerprint) {
|
||||
self.db.recordBill(deviceFingerprint, rec, function (err) {
|
||||
if (err) logger.error(err);
|
||||
});
|
||||
|
||||
// This is where we record starting trade balance at the beginning
|
||||
// of the user session
|
||||
var sessionInfo = this._sessionInfo[deviceFingerprint];
|
||||
|
|
@ -336,7 +340,7 @@ Trader.prototype.pollRate = function (callback) {
|
|||
|
||||
logger.debug('got rates: %j', resRates);
|
||||
self.rateInfo = {rates: resRates, timestamp: new Date()};
|
||||
callback && callback();
|
||||
if (callback) callback();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue