mirror of https://github.com/BTCPrivate/copay.git
destroy listener on copayers view
This commit is contained in:
parent
eb945b4589
commit
470cf23999
|
@ -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…
Reference in New Issue