Merge pull request #6059 from gabrielbazan7/fix/redirectHome

destroy listener on copayers view
This commit is contained in:
Gustavo Maximiliano Cortez 2017-05-23 10:44:59 -03:00 committed by GitHub
commit bb347dbe4e

View file

@ -12,10 +12,14 @@ angular.module('copayApp.controllers').controller('copayersController',
updateWallet();
});
$rootScope.$on('bwsEvent', function() {
var listener = $rootScope.$on('bwsEvent', function() {
updateWallet();
});
$scope.$on('$destroy', function() {
listener();
});
var updateWallet = function() {
$log.debug('Updating wallet:' + $scope.wallet.name)
walletService.getStatus($scope.wallet, {}, function(err, status) {