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 copayers = this.getRegisteredCopayerIds();
for (var k in this.txProposals.txps) {
var i = this.txProposals.getTxProposal(k, copayers);
i.signedByUs = i.signedBy[this.getMyCopayerId()] ? true : false;
i.rejectedByUs = i.rejectedBy[this.getMyCopayerId()] ? true : false;
if (this.totalCopayers - i.rejectCount < this.requiredCopayers)
i.finallyRejected = true;
var txp = this.txProposals.getTxProposal(k, copayers);
txp.signedByUs = txp.signedBy[this.getMyCopayerId()] ? true : false;
txp.rejectedByUs = txp.rejectedBy[this.getMyCopayerId()] ? true : false;
if (this.totalCopayers - txp.rejectCount < this.requiredCopayers) {
txp.finallyRejected = true;
}
ret.push(i);
ret.push(txp);
}
return ret;
};