diff --git a/js/controllers/more.js b/js/controllers/more.js index 5f06a84a3..782b4fd29 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -64,8 +64,11 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.hideAdv = true; $scope.hidePriv = true; - if (w) + $scope.hideSecret = true; + if (w) { $scope.priv = w.privateKey.toObj().extendedPrivateKeyString; + $scope.secret = w.getSecret(); + } $scope.downloadBackup = function() { backupService.download(w); diff --git a/js/models/Wallet.js b/js/models/Wallet.js index ef03b775a..590fa609a 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -524,6 +524,7 @@ Wallet.prototype._onData = function(senderId, data, ts) { log.debug('RECV', senderId, data); if (data.type !== 'walletId' && this.id !== data.walletId) { + log.debug('Received corrupt message:', data) this.emit('corrupt', senderId); this.updateTimestamp(ts); return; diff --git a/js/models/WalletFactory.js b/js/models/WalletFactory.js index 83e1fdbde..4f887210b 100644 --- a/js/models/WalletFactory.js +++ b/js/models/WalletFactory.js @@ -451,7 +451,7 @@ WalletFactory.prototype.joinCreateSession = function(opts, cb) { }; if (opts.privateHex && opts.privateHex.length > 1) { - privOpts.extendedPrivateKeyString = privateHex; + privOpts.extendedPrivateKeyString = opts.privateHex; } //Create our PrivateK diff --git a/test/mocks/FakeWallet.js b/test/mocks/FakeWallet.js index 0010d5fe6..c5ecbb244 100644 --- a/test/mocks/FakeWallet.js +++ b/test/mocks/FakeWallet.js @@ -59,6 +59,11 @@ FakeWallet.prototype.createTx = function(toAddress, amountSatStr, comment, opts, callback(null, {}); } + +FakeWallet.prototype.getSecret = function() { + return 'xxx'; +}; + FakeWallet.prototype.sendTx = function(ntxid, cb) { cb(8); } diff --git a/views/more.html b/views/more.html index 65eafed3b..c6390c281 100644 --- a/views/more.html +++ b/views/more.html @@ -87,6 +87,21 @@ +
+

+ Join Secret

+

+ This is the initial secret join string. Since your wallet it is already complete, this is only useful to rejoin peers that loose their backup BUT have the extented private key stored (they will be rejected on other case). They need to enter their extended private key during the join process (in advenced options). +

+
+ + Show + Hide + +
+ +
+