diff --git a/js/controllers/sidebar.js b/js/controllers/sidebar.js index 66e2034d0..576618b8f 100644 --- a/js/controllers/sidebar.js +++ b/js/controllers/sidebar.js @@ -67,12 +67,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function( if (controllerUtils.isFocusedWallet(wid)) return; var w = $rootScope.iden.getWalletById(wid); $scope.wallets.push(w); - controllerUtils.updateBalance(w, function(err, res) { - if (err) return; - setTimeout(function() { - $scope.$digest(); - }, 1); - }); + controllerUtils.updateTxsAndBalance(w); }); }; }); diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index c04481eea..b371bd332 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -64,7 +64,7 @@ angular.module('copayApp.services') root.isFocusedWallet = function(wid) { - return wid === $rootScope.wallet.getId(); + return $rootScope.wallet && wid === $rootScope.wallet.getId(); };