From e346184339381d6071a72ff440fd2e58b03892d9 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 17 Sep 2015 11:39:23 -0300 Subject: [PATCH] add dryRun param --- lib/server.js | 5 +++++ package.json | 2 +- test/integration/server.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/server.js b/lib/server.js index 6099f2e..577ae30 100644 --- a/lib/server.js +++ b/lib/server.js @@ -423,6 +423,11 @@ WalletService.prototype._addCopayerToWallet = function(wallet, opts, cb) { if (err) return cb(err); if (res) return cb(Errors.COPAYER_REGISTERED); + if (opts.dryRun) return cb(null, { + copayerId: null, + wallet: wallet + }); + wallet.addCopayer(copayer); self.storage.storeWalletAndUpdateCopayersLookup(wallet, function(err) { if (err) return cb(err); diff --git a/package.json b/package.json index a7277b5..13a4e85 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "bitcore-wallet-service", "description": "A service for Mutisig HD Bitcoin Wallets", "author": "BitPay Inc", - "version": "0.2.2", + "version": "0.2.3", "keywords": [ "bitcoin", "copay", diff --git a/test/integration/server.js b/test/integration/server.js index 2d5e57e..c4872bd 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -1078,7 +1078,7 @@ describe('Wallet service', function() { }); }); - it.only('should be able to get wallet info without actually joining', function(done) { + it('should be able to get wallet info without actually joining', function(done) { var copayerOpts = helpers.getSignedCopayerOpts({ walletId: walletId, name: 'me',