From 436aeda1c3be71ac875956664fb09c0f4eedb37f Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sun, 30 Nov 2014 04:03:23 -0300 Subject: [PATCH] fix profile --- js/controllers/home.js | 4 ++-- js/controllers/profile.js | 6 ++++++ views/profile.html | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/controllers/home.js b/js/controllers/home.js index 16ee866d1..58c70e93e 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, notification, identityService, Compatibility) { +angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, $timeout, notification, identityService, Compatibility) { // This is only for backwards compat, insight api should link to #!/confirmed directly if (getParam('confirmed')) { var hashIndex = window.location.href.indexOf('/?'); @@ -24,6 +24,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc } $rootScope.starting = true; identityService.open(form.email.$modelValue, form.password.$modelValue, function(err, iden) { + $rootScope.starting = false; if (err) { copay.logger.warn(err); if ((err.toString() || '').match('PNOTFOUND')) { @@ -31,7 +32,6 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc } else { $scope.error = 'Unknown error'; } - $rootScope.$digest() } }); } diff --git a/js/controllers/profile.js b/js/controllers/profile.js index f1a3e90ef..2b9bb0cd4 100644 --- a/js/controllers/profile.js +++ b/js/controllers/profile.js @@ -23,6 +23,12 @@ angular.module('copayApp.controllers').controller('ProfileController', function( }); }; + $scope.setWallets = function() { + if (!$rootScope.iden) return; + $scope.wallets=$rootScope.iden.listWallets(); + }; + + $scope.downloadWalletBackup = function(w) { if (!w) return; backupService.walletDownload(w); diff --git a/views/profile.html b/views/profile.html index 82df6f426..e1b1ebea2 100644 --- a/views/profile.html +++ b/views/profile.html @@ -1,4 +1,4 @@ -
+

{{$root.title}}