refactors

This commit is contained in:
Manuel Araoz 2014-06-17 14:31:15 -03:00
parent e0db6cac28
commit b791d58c6c
1 changed files with 7 additions and 6 deletions

View File

@ -447,13 +447,14 @@ Wallet.prototype.getTxProposals = function() {
var ret = []; var ret = [];
var copayers = this.getRegisteredCopayerIds(); var copayers = this.getRegisteredCopayerIds();
for (var k in this.txProposals.txps) { for (var k in this.txProposals.txps) {
var i = this.txProposals.getTxProposal(k, copayers); var txp = this.txProposals.getTxProposal(k, copayers);
i.signedByUs = i.signedBy[this.getMyCopayerId()] ? true : false; txp.signedByUs = txp.signedBy[this.getMyCopayerId()] ? true : false;
i.rejectedByUs = i.rejectedBy[this.getMyCopayerId()] ? true : false; txp.rejectedByUs = txp.rejectedBy[this.getMyCopayerId()] ? true : false;
if (this.totalCopayers - i.rejectCount < this.requiredCopayers) if (this.totalCopayers - txp.rejectCount < this.requiredCopayers) {
i.finallyRejected = true; txp.finallyRejected = true;
}
ret.push(i); ret.push(txp);
} }
return ret; return ret;
}; };