From 4b3cbfcfb0eff98bbc7952e039740bc2cbe003c1 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 20 Aug 2014 20:29:07 -0400 Subject: [PATCH] add test for priv key import --- js/controllers/backup.js | 2 +- js/controllers/join.js | 2 +- js/models/core/WalletFactory.js | 2 +- views/join.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/controllers/backup.js b/js/controllers/backup.js index 9b0e23656..4c9311e02 100644 --- a/js/controllers/backup.js +++ b/js/controllers/backup.js @@ -2,7 +2,7 @@ angular.module('copayApp.controllers').controller('BackupController', function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils) { - var s = ($location.search()).showPrivate; + var s = ($location.search()).advanced; if (s) { var w = $rootScope.wallet; $scope.priv = w.privateKey.toObj().extendedPrivateKeyString; diff --git a/js/controllers/join.js b/js/controllers/join.js index 5c4f68986..4bea5625f 100644 --- a/js/controllers/join.js +++ b/js/controllers/join.js @@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('JoinController', var context; var localMediaStream; - var s = ($location.search()).enterPrivate; + var s = ($location.search()).advanced; if (s) { $scope.enterPrivate = true; } diff --git a/js/models/core/WalletFactory.js b/js/models/core/WalletFactory.js index 146f21e9a..846666744 100644 --- a/js/models/core/WalletFactory.js +++ b/js/models/core/WalletFactory.js @@ -224,7 +224,7 @@ WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphras networkName: this.networkName, }; - if (privateHex && privateHex.length>10) { + if (privateHex && privateHex.length>1) { privOpts.extendedPrivateKeyString = privateHex; } diff --git a/views/join.html b/views/join.html index 36a2e7dbc..20cbad630 100644 --- a/views/join.html +++ b/views/join.html @@ -69,9 +69,9 @@ match="joinPassword" required>