always show all copayers in tx proposal list
This commit is contained in:
parent
e8365f3cd5
commit
0dfac71bfe
3 changed files with 27 additions and 7 deletions
|
|
@ -180,8 +180,8 @@ TxProposals.prototype._mergeBuilder = function(myTxps, theirTxps, mergeInfo) {
|
|||
};
|
||||
|
||||
TxProposals.prototype.add = function(data) {
|
||||
var id = data.builder.build().getNormalizedHash().toString('hex');
|
||||
this.txps[id] = new TxProposal(data);
|
||||
var ntxid = data.builder.build().getNormalizedHash().toString('hex');
|
||||
this.txps[ntxid] = new TxProposal(data);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -191,12 +191,20 @@ TxProposals.prototype.setSent = function(ntxid,txid) {
|
|||
};
|
||||
|
||||
|
||||
TxProposals.prototype.getTxProposal = function(ntxid) {
|
||||
TxProposals.prototype.getTxProposal = function(ntxid, copayers) {
|
||||
var txp = this.txps[ntxid];
|
||||
var i = JSON.parse(JSON.stringify(txp));
|
||||
i.builder = txp.builder;
|
||||
i.ntxid = ntxid;
|
||||
i.peerActions = {};
|
||||
|
||||
if (copayers) {
|
||||
for(var j=0; j < copayers.length; j++) {
|
||||
var p = copayers[j];
|
||||
i.peerActions[p] = {};
|
||||
}
|
||||
}
|
||||
|
||||
for(var p in txp.seenBy){
|
||||
i.peerActions[p]={seen: txp.seenBy[p]};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue