Browse Source

Merge pull request #571 from isocolsky/fix/idempotence

Return txp when republishing
activeAddress
Matias Alejo Garcia 9 years ago
committed by GitHub
parent
commit
0d020c1860
  1. 2
      lib/server.js
  2. 3
      test/integration/server.js

2
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);

3
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);

Loading…
Cancel
Save