From 9984ad0d8f442a14f13bb0a4b906d8aff0dd55a2 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Fri, 19 Aug 2016 15:06:25 -0300 Subject: [PATCH] return txp when republishing --- lib/server.js | 2 +- test/integration/server.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/server.js b/lib/server.js index bcbe178..e6343af 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1881,7 +1881,7 @@ WalletService.prototype.publishTx = function(opts, cb) { self.storage.fetchTx(self.walletId, opts.txProposalId, function(err, txp) { if (err) return cb(err); if (!txp) return cb(Errors.TX_NOT_FOUND); - if (!txp.isTemporary()) return cb(); + if (!txp.isTemporary()) return cb(null, txp); var copayer = wallet.getCopayer(self.copayerId); diff --git a/test/integration/server.js b/test/integration/server.js index a1e79a9..8068ddb 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -2369,8 +2369,9 @@ describe('Wallet service', function() { should.exist(tx); tx.id.should.equal('123'); var publishOpts = helpers.getProposalSignatureOpts(tx, TestData.copayers[0].privKey_1H_0); - server.publishTx(publishOpts, function(err) { + server.publishTx(publishOpts, function(err, tx) { should.not.exist(err); + should.exist(tx); server.createTx(txOpts, function(err, tx) { should.not.exist(err); should.exist(tx);