add dryRun param

This commit is contained in:
Ivan Socolsky 2015-09-17 11:39:23 -03:00
parent d86dae7d17
commit e346184339
3 changed files with 7 additions and 2 deletions

View File

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

View File

@ -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",

View File

@ -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',