|
@ -222,7 +222,7 @@ CopayServer.prototype.joinWallet = function(opts, cb) { |
|
|
self.storage.fetchCopayerLookup(copayer.id, function(err, res) { |
|
|
self.storage.fetchCopayerLookup(copayer.id, function(err, res) { |
|
|
if (err) return cb(err); |
|
|
if (err) return cb(err); |
|
|
if (res) |
|
|
if (res) |
|
|
return cb(new ClientError('CREGISTED', 'Copayer ID already registered on server')); |
|
|
return cb(new ClientError('CREGISTERED', 'Copayer ID already registered on server')); |
|
|
|
|
|
|
|
|
wallet.addCopayer(copayer); |
|
|
wallet.addCopayer(copayer); |
|
|
self.storage.storeWalletAndUpdateCopayersLookup(wallet, function(err) { |
|
|
self.storage.storeWalletAndUpdateCopayersLookup(wallet, function(err) { |
|
|