From 004336e64fc94d3b56f48a3428bbb463df791ada Mon Sep 17 00:00:00 2001 From: JDonadio Date: Thu, 2 Feb 2017 18:04:08 -0300 Subject: [PATCH] load data after transition --- src/js/controllers/walletDetails.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index a137077b3..992cbcc61 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -347,12 +347,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.addressbook = ab || {}; }); - $scope.updateAll(); - refreshAmountSection(); - listeners = [ $rootScope.$on('bwsEvent', function(e, walletId) { - if (walletId == $scope.wallet.id && e.type!='NewAddress') + if (walletId == $scope.wallet.id && e.type != 'NewAddress') $scope.updateAll(); }), $rootScope.$on('Local/TxAction', function(e, walletId) { @@ -362,6 +359,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun ]; }); + $scope.$on("$ionicView.afterEnter", function(event, data) { + $scope.updateAll(); + refreshAmountSection(); + }); + $scope.$on("$ionicView.beforeLeave", function(event, data) { if ($window.StatusBar) { $window.StatusBar.backgroundColorByHexString('#1e3186');