fixed small bug in getPendingTxProposals

This commit is contained in:
Ivan Socolsky 2014-11-14 14:10:07 -03:00
commit dcb561a2b0

View file

@ -1363,8 +1363,7 @@ Wallet.prototype.getPendingTxProposals = function() {
var txps = this.getTxProposals(); var txps = this.getTxProposals();
var satToUnit = 1 / this.settings.unitToSatoshi; var satToUnit = 1 / this.settings.unitToSatoshi;
_.find(txps, function(txp) { _.each(_.where(txps, 'isPending'), function(txp) {
if (txp.isPending) {
pendingForUs++; pendingForUs++;
var addresses = {}; var addresses = {};
var outs = JSON.parse(txp.builder.vanilla.outs); var outs = JSON.parse(txp.builder.vanilla.outs);
@ -1386,7 +1385,6 @@ Wallet.prototype.getPendingTxProposals = function() {
txp.missingSignatures = txp.builder.build().countInputMissingSignatures(0); txp.missingSignatures = txp.builder.build().countInputMissingSignatures(0);
txp.actionList = self._getActionList(txp.peerActions); txp.actionList = self._getActionList(txp.peerActions);
ret.txs.push(txp); ret.txs.push(txp);
}
}); });
ret.pendingForUs = pendingForUs; ret.pendingForUs = pendingForUs;