Ivan Socolsky
8 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
2 changed files with
11 additions and
6 deletions
-
lib/server.js
-
test/integration/server.js
|
|
@ -2068,7 +2068,10 @@ WalletService.prototype.editTxNote = function(opts, cb) { |
|
|
|
} else { |
|
|
|
note.edit(opts.body, self.copayerId); |
|
|
|
} |
|
|
|
self.storage.storeTxNote(note, cb); |
|
|
|
self.storage.storeTxNote(note, function(err) { |
|
|
|
if (err) return cb(err); |
|
|
|
self.storage.fetchTxNote(self.walletId, opts.txid, cb); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
@ -3761,19 +3761,21 @@ describe('Wallet service', function() { |
|
|
|
server.editTxNote({ |
|
|
|
txid: '123', |
|
|
|
body: 'note body' |
|
|
|
}, function(err) { |
|
|
|
}, function(err, note) { |
|
|
|
should.not.exist(err); |
|
|
|
note.txid.should.equal('123'); |
|
|
|
note.walletId.should.equal(wallet.id); |
|
|
|
note.body.should.equal('note body'); |
|
|
|
note.editedBy.should.equal(server.copayerId); |
|
|
|
note.editedByName.should.equal('copayer 1'); |
|
|
|
note.createdOn.should.equal(note.editedOn); |
|
|
|
server.getTxNote({ |
|
|
|
txid: '123', |
|
|
|
}, function(err, note) { |
|
|
|
should.not.exist(err); |
|
|
|
should.exist(note); |
|
|
|
note.txid.should.equal('123'); |
|
|
|
note.walletId.should.equal(wallet.id); |
|
|
|
note.body.should.equal('note body'); |
|
|
|
note.editedBy.should.equal(server.copayerId); |
|
|
|
note.editedByName.should.equal('copayer 1'); |
|
|
|
note.createdOn.should.equal(note.editedOn); |
|
|
|
done(); |
|
|
|
}); |
|
|
|
}); |
|
|
|