|
|
@ -222,7 +222,7 @@ CopayServer.prototype.joinWallet = function(opts, cb) { |
|
|
|
self.storage.fetchCopayerLookup(copayer.id, function(err, res) { |
|
|
|
if (err) return cb(err); |
|
|
|
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); |
|
|
|
self.storage.storeWalletAndUpdateCopayersLookup(wallet, function(err) { |
|
|
@ -378,7 +378,7 @@ CopayServer.prototype._getUtxos = function(cb) { |
|
|
|
// Needed for the clients to sign UTXOs
|
|
|
|
_.each(utxos, function(utxo) { |
|
|
|
utxo.satoshis = utxo.satoshis ? +utxo.satoshis : Utils.strip(utxo.amount * 1e8); |
|
|
|
delete utxo.amount; |
|
|
|
delete utxo.amount; |
|
|
|
utxo.path = addressToPath[utxo.address].path; |
|
|
|
utxo.publicKeys = addressToPath[utxo.address].publicKeys; |
|
|
|
}); |
|
|
|