add dryRun param
This commit is contained in:
parent
d86dae7d17
commit
e346184339
|
@ -423,6 +423,11 @@ WalletService.prototype._addCopayerToWallet = function(wallet, opts, cb) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
if (res) return cb(Errors.COPAYER_REGISTERED);
|
if (res) return cb(Errors.COPAYER_REGISTERED);
|
||||||
|
|
||||||
|
if (opts.dryRun) return cb(null, {
|
||||||
|
copayerId: null,
|
||||||
|
wallet: wallet
|
||||||
|
});
|
||||||
|
|
||||||
wallet.addCopayer(copayer);
|
wallet.addCopayer(copayer);
|
||||||
self.storage.storeWalletAndUpdateCopayersLookup(wallet, function(err) {
|
self.storage.storeWalletAndUpdateCopayersLookup(wallet, function(err) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "bitcore-wallet-service",
|
"name": "bitcore-wallet-service",
|
||||||
"description": "A service for Mutisig HD Bitcoin Wallets",
|
"description": "A service for Mutisig HD Bitcoin Wallets",
|
||||||
"author": "BitPay Inc",
|
"author": "BitPay Inc",
|
||||||
"version": "0.2.2",
|
"version": "0.2.3",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
"copay",
|
"copay",
|
||||||
|
|
|
@ -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({
|
var copayerOpts = helpers.getSignedCopayerOpts({
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
name: 'me',
|
name: 'me',
|
||||||
|
|
Loading…
Reference in New Issue