diff --git a/www/js/controllers/home-controllers.js b/www/js/controllers/home-controllers.js index 613ca99579bf23a7333eb9d4ded09d9675ae87a8..257f56f9e0318b4f049d7f885527738850ce310a 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 dd61879a69a004fde77489cc9e17756d39fbc2ad..a4c1d564b90052fbf37102b9718db151811ccb45 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) {