diff --git a/js/controllers/homeWallet.js b/js/controllers/homeWallet.js index 32ad7680a..2dcc6e0a2 100644 --- a/js/controllers/homeWallet.js +++ b/js/controllers/homeWallet.js @@ -2,13 +2,9 @@ angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $modal, controllerUtils) { + controllerUtils.redirIfNotComplete(); - $rootScope.title = 'Home'; - if ($rootScope.addrInfos) { - $scope.address = $rootScope.addrInfos[0]; - } - } ); diff --git a/js/controllers/paymentIntent.js b/js/controllers/paymentIntent.js index e2ae6b294..47d418146 100644 --- a/js/controllers/paymentIntent.js +++ b/js/controllers/paymentIntent.js @@ -11,9 +11,11 @@ angular.module('copayApp.controllers').controller('PaymentIntentController', fun var w = $rootScope.iden.getWalletById(wid); if (w && w.isReady()) { $scope.wallets.push(w); + controllerUtils.clearBalanceCache(w); controllerUtils.updateBalance(w, function() { $rootScope.$digest(); }); + } }); @@ -28,9 +30,9 @@ angular.module('copayApp.controllers').controller('PaymentIntentController', fun } }); - modalInstance.result.then(function(selectedItem) {}, function() { - $rootScope.pendingPayment = null; - }); + // modalInstance.result.then(function(selectedItem) {}, function() { + // $rootScope.pendingPayment = null; + // }); }; @@ -38,16 +40,16 @@ angular.module('copayApp.controllers').controller('PaymentIntentController', fun // It is not the same as the $modal service used above. var ModalInstanceCtrl = function($scope, $modalInstance, items, controllerUtils) { - $scope.wallets = items; - $scope.ok = function(selectedItem) { controllerUtils.setPaymentWallet(selectedItem); $modalInstance.close(); }; $scope.cancel = function() { - $modalInstance.dismiss('cancel'); + $rootScope.pendingPayment = null; + controllerUtils.setFocusedWallet($scope.wallets[0]); + $modalInstance.close(); }; }; diff --git a/views/homeWallet.html b/views/homeWallet.html index f566788fd..5183b835c 100644 --- a/views/homeWallet.html +++ b/views/homeWallet.html @@ -37,15 +37,15 @@

Quick receive

- +
-

{{address.addressStr}}

+

{{$root.addrInfos[0].addressStr}}

-