Browse Source

Merge pull request #575 from matiu/reaf/newproposalid

add message and id to new tx proposal
activeAddress
Ivan Socolsky 9 years ago
committed by GitHub
parent
commit
3fdc6485c0
  1. 4
      lib/server.js
  2. 7
      test/integration/server.js

4
lib/server.js

@ -1992,7 +1992,9 @@ WalletService.prototype.publishTx = function(opts, cb) {
if (err) return cb(err);
self._notify('NewTxProposal', {
amount: txp.getTotalAmount()
amount: txp.getTotalAmount(),
txProposalId: txp.id,
message: txp.message,
}, function() {
return cb(null, txp);
});

7
test/integration/server.js

@ -2605,7 +2605,12 @@ describe('Wallet service', function() {
should.not.exist(err);
server.getNotifications({}, function(err, notifications) {
should.not.exist(err);
_.pluck(notifications, 'type').should.contain('NewTxProposal');
var n = _.find(notifications, {'type': 'NewTxProposal'});
should.exist(n);
should.exist(n.data.txProposalId);
should.exist(n.data.message);
done();
});
});

Loading…
Cancel
Save