Merge pull request #6059 from gabrielbazan7/fix/redirectHome
destroy listener on copayers view
This commit is contained in:
commit
bb347dbe4e
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue