Merge pull request #5583 from JDonadio/bug/delete-wallet-02

Update scope after delete wallet - receive tab
This commit is contained in:
Gustavo Maximiliano Cortez 2017-02-16 11:58:56 -03:00 committed by GitHub
commit fc07571811
1 changed files with 7 additions and 3 deletions

View File

@ -152,7 +152,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.loadAddresses(wallet);
});
listeners = [
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
// Update current address
@ -161,7 +160,12 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
];
// Update current wallet
if ($scope.wallet) $scope.updateCurrentWallet();
if ($scope.wallet) {
var w = lodash.find($scope.wallets, function(w) {
return w.id == $scope.wallet.id;
});
if (w) $scope.updateCurrentWallet();
}
});
$scope.$on("$ionicView.leave", function(event, data) {