From 0ce69590b85296f56e6459af5c0759816b0933ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Mon, 14 Dec 2015 15:18:26 -0300 Subject: [PATCH] refactor --- src/js/controllers/index.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index ad17c45bd..6fae1ade5 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -154,9 +154,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r self.disclaimerAccepted = true; profileService.setDisclaimerAccepted(function(err) { if (err) $log.error(err); - if (lodash.isEmpty(profileService.focusedClient)) { - $rootScope.$emit('Local/NoWallets'); - } else go.walletHome(); + go.walletHome(); }); }; @@ -1359,16 +1357,17 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); $rootScope.$on('Local/NoWallets', function(event) { - profileService.isDisclaimerAccepted(function(v) { - if (v) { - $timeout(function() { - self.hasProfile = true; - self.noFocusedWallet = true; - self.isComplete = null; - self.walletName = null; + + $timeout(function() { + self.hasProfile = true; + self.noFocusedWallet = true; + self.isComplete = null; + self.walletName = null; + profileService.isDisclaimerAccepted(function(v) { + if (v) { go.path('import'); - }); - } + } + }); }); });