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

- Fix new account creation

parent 4834698d
No related branches found
No related tags found
No related merge requests found
......@@ -120,8 +120,7 @@ function NewAccountModalController($scope, $state, UIUtils, CryptoUtils, Wallet,
Wallet.login($scope.formData.username, $scope.formData.password)
.then(function() {
if (!$scope.formData.isMember) {
// Reset account data, and open wallet view
$scope.cancel();
// Redirect to wallet
$state.go('app.view_wallet');
return;
}
......@@ -132,8 +131,7 @@ function NewAccountModalController($scope, $state, UIUtils, CryptoUtils, Wallet,
// Send membership IN
Wallet.membership.inside()
.then(function() {
// Reset account data, and open wallet view
$scope.cancel();
// Redirect to wallet
$state.go('app.view_wallet');
})
.catch(UIUtils.onError('ERROR.SEND_MEMBERSHIP_IN_FAILED'));
......
......@@ -3,7 +3,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser
'cesium.settings.services'])
.factory('Wallet', function($q, $rootScope, CryptoUtils, BMA, $translate, localStorage, $filter, Api, csSettings, csNetwork) {
.factory('Wallet', function($q, $rootScope, $timeout, $translate, $filter, Api, localStorage, CryptoUtils, BMA, csSettings, csNetwork) {
'ngInject';
Wallet = function(id) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment