Skip to content
Snippets Groups Projects
Commit 14bb11da authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Fix join wizard

parent 694d4ca1
No related branches found
No related tags found
No related merge requests found
......@@ -318,7 +318,13 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt
UIUtils.loading.show();
return csWallet.login({auth: true, expectedPubkey: $scope.formData.pubkey, isNew: true})
return csWallet.login({
auth: true,
isNew: true,
method: 'SCRYPT_DEFAULT',
expectedPubkey: $scope.formData.pubkey,
showMethods: false
})
.then(function() {
if ($scope.accountType === "member") {
$scope.closeModal();
......
......@@ -19,6 +19,7 @@ function LoginModalController($scope, $timeout, $q, $ionicPopover, CryptoUtils,
$scope.pubkeyPattern = '^' + BMA.constants.regexp.PUBKEY + '$';
$scope.isAuth = parameters.auth;
$scope.showMethods = angular.isDefined(parameters.showMethods) ? parameters.showMethods : true;
$scope.expectedPubkey = parameters.expectedPubkey;
$scope.scryptParamsValues = _.keys(CryptoUtils.constants.SCRYPT_PARAMS)
......@@ -40,7 +41,7 @@ function LoginModalController($scope, $timeout, $q, $ionicPopover, CryptoUtils,
$scope.formData.keepAuth = ($scope.formData.keepAuthIdle == csSettings.constants.KEEP_AUTH_IDLE_SESSION);
// Init method
var method = csSettings.data.login && csSettings.data.login.method || 'SCRYPT_DEFAULT';
var method = parameters.method || csSettings.data.login && csSettings.data.login.method || 'SCRYPT_DEFAULT';
var params = csSettings.data.login && csSettings.data.login.params;
if ($scope.isAuth && method == 'PUBKEY') {
method = 'SCRYPT_DEFAULT'; // PUBKEY not enable if auth need
......
......@@ -22,7 +22,7 @@
ng-init="setForm(loginForm)"
ng-switch on="formData.method">
<div class="item hidden-xs no-padding">
<div class="item hidden-xs no-padding" ng-if="showMethods">
<div class="pull-right">
<a class="button button-text button-small-padding icon-right ink"
ng-click="showMethodsPopover($event)">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment