Clarify the purpose of BalanceUpdated event emission

This commit is contained in:
Kosta Korenkov 2015-07-13 22:25:34 +03:00
parent 9dfca68354
commit a8b20d3e7d
1 changed files with 4 additions and 1 deletions

View File

@ -278,11 +278,14 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.walletScanStatus = walletStatus.wallet.scanStatus;
self.copayers = walletStatus.wallet.copayers;
self.preferences = walletStatus.preferences;
$rootScope.$emit('Local/BalanceUpdated', walletStatus.balance);
self.setBalance(walletStatus.balance);
self.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) {
return w.id != self.walletId;
});;
// Notify external addons or plugins
$rootScope.$emit('Local/BalanceUpdated', walletStatus.balance);
$rootScope.$apply();
});
});