From 09f4e5285a5dd6b003a54e6d9ab5cfdfff5d79d4 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 24 Aug 2016 16:41:29 -0300 Subject: [PATCH] add message and id to new tx proposal Conflicts: test/integration/server.js --- lib/server.js | 4 +++- test/integration/server.js | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/server.js b/lib/server.js index 2c95164..33f74b0 100644 --- a/lib/server.js +++ b/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); }); diff --git a/test/integration/server.js b/test/integration/server.js index 18dc51a..b9580da 100644 --- a/test/integration/server.js +++ b/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(); }); });