diff --git a/lib/client/api.js b/lib/client/api.js index c1ce949..b8dd5c9 100644 --- a/lib/client/api.js +++ b/lib/client/api.js @@ -154,7 +154,6 @@ API.prototype.createWallet = function(walletName, copayerName, m, n, network, cb if (data) return cb('Storage already contains a wallet'); - console.log('[API.js.132]'); //TODO // Generate wallet key pair to verify copayers var privKey = new Bitcore.PrivateKey(null, network); var pubKey = privKey.toPublicKey(); @@ -223,7 +222,7 @@ API.prototype._joinWallet = function(data, secret, copayerName, cb) { var wallet = body.wallet; data.copayerId = body.copayerId; data.walletPrivKey = walletPrivKey.toWIF(); - data.signingPrivKey = signingPrivKey.toString(); + data.signingPrivKey = signingPrivKey.toWIF(); data.m = wallet.m; data.n = wallet.n; data.publicKeyRing = wallet.publicKeyRing; @@ -312,11 +311,11 @@ API.prototype.getBalance = function(cb) { API.prototype.export = function(cb) { var self = this; - this._loadAndCheck( function(err, data) { - if (err) return cb(err); - var x = _.pick(data,['publicKeyRing','xPrivKey', 'copayerId', 'signingPrivKey']) - return cb(null, JSON.stringify(x)); - }); + this._loadAndCheck(function(err, data) { + if (err) return cb(err); + var x = _.pick(data, ['publicKeyRing', 'xPrivKey', 'copayerId', 'm']) + return cb(null, JSON.stringify(x)); + }); } API.prototype.getTxProposals = function(opts, cb) {