Trader#rate is synchronous

This commit is contained in:
Maciej Małecki 2014-04-26 16:59:01 +02:00
parent afef106859
commit 046a680043

View file

@ -81,12 +81,12 @@ Trader.prototype._consolidateTrades = function () {
Trader.prototype._purchase = function (trade) {
var self = this;
self.rate(trade.currency, function (err, rate) {
var rate = self.rate(trade.currency);
self.tradeExchange.purchase(trade.satoshis, rate, function (err) {
console.dir(arguments);
// XXX: don't ignore purchase errors
self.pollBalance();
});
});
};
Trader.prototype.configure = function (config) {