From 3bc7d4ccc4a420f4ccd5560de0804c807a4d26f4 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Thu, 25 Aug 2016 09:11:26 +0200 Subject: [PATCH] - Fix new account creation --- www/js/controllers/home-controllers.js | 6 ++---- www/js/services/wallet-services.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/www/js/controllers/home-controllers.js b/www/js/controllers/home-controllers.js index 613ca9957..257f56f9e 100644 --- a/www/js/controllers/home-controllers.js +++ b/www/js/controllers/home-controllers.js @@ -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')); diff --git a/www/js/services/wallet-services.js b/www/js/services/wallet-services.js index dd61879a6..a4c1d564b 100644 --- a/www/js/services/wallet-services.js +++ b/www/js/services/wallet-services.js @@ -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) { -- GitLab