add test for priv key import

This commit is contained in:
Matias Alejo Garcia 2014-08-20 20:29:07 -04:00
commit 4b3cbfcfb0
4 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@
angular.module('copayApp.controllers').controller('BackupController', angular.module('copayApp.controllers').controller('BackupController',
function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils) { function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils) {
var s = ($location.search()).showPrivate; var s = ($location.search()).advanced;
if (s) { if (s) {
var w = $rootScope.wallet; var w = $rootScope.wallet;
$scope.priv = w.privateKey.toObj().extendedPrivateKeyString; $scope.priv = w.privateKey.toObj().extendedPrivateKeyString;

View file

@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('JoinController',
var context; var context;
var localMediaStream; var localMediaStream;
var s = ($location.search()).enterPrivate; var s = ($location.search()).advanced;
if (s) { if (s) {
$scope.enterPrivate = true; $scope.enterPrivate = true;
} }

View file

@ -224,7 +224,7 @@ WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphras
networkName: this.networkName, networkName: this.networkName,
}; };
if (privateHex && privateHex.length>10) { if (privateHex && privateHex.length>1) {
privOpts.extendedPrivateKeyString = privateHex; privOpts.extendedPrivateKeyString = privateHex;
} }

View file

@ -69,9 +69,9 @@
match="joinPassword" required> match="joinPassword" required>
<input type="text" <input type="text"
placeholder="Private" placeholder="Private Key (Hex)"
name="private" name="private"
ng-model="private" ng-model="$parent.private"
ng-if="enterPrivate"> ng-if="enterPrivate">
<div class="text-right"> <div class="text-right">