From a8b20d3e7dd90ad964fad4a9a26a7e0a3e59d5b5 Mon Sep 17 00:00:00 2001 From: Kosta Korenkov <7r0ggy@gmail.com> Date: Mon, 13 Jul 2015 22:25:34 +0300 Subject: [PATCH] Clarify the purpose of BalanceUpdated event emission --- src/js/controllers/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 857549eb5..6de662943 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -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(); }); });