mirror of https://github.com/BTCPrivate/copay.git
add seenBy on creator
This commit is contained in:
parent
f5f9848ff1
commit
4cf152999a
|
@ -271,7 +271,7 @@ TxProposal.prototype.setCopayers = function(senderId, keyMap, readOnlyPeers) {
|
|||
// from senderId, and must be signed by senderId
|
||||
if (isNew) {
|
||||
this.creator = Object.keys(newCopayer)[0];
|
||||
this.createdTs = Date.now();
|
||||
this.seenBy[this.creator] = this.createdTs = Date.now();
|
||||
}
|
||||
|
||||
//Ended. Update this.
|
||||
|
@ -283,7 +283,6 @@ TxProposal.prototype.setCopayers = function(senderId, keyMap, readOnlyPeers) {
|
|||
for(var i in this.signedBy) {
|
||||
delete this.rejectedBy[i];
|
||||
}
|
||||
console.log('[TxProposal.js.287:newCopayer:]',newCopayer); //TODO
|
||||
|
||||
return Object.keys(newCopayer);
|
||||
};
|
||||
|
|
|
@ -363,6 +363,7 @@ describe('TxProposal', function() {
|
|||
Object.keys(txp.signedBy).length.should.equal(1);
|
||||
txp.creator.should.equal('creator');
|
||||
txp.createdTs.should.gte(ts);
|
||||
txp.seenBy['creator'].should.equal(txp.createdTs);
|
||||
})
|
||||
it("New tx should have only 1 signature", function() {
|
||||
var txp = dummyProposal;
|
||||
|
|
Loading…
Reference in New Issue