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