Merge pull request #1642 from bechi/bugs/ui-09

Bugs/ui 09
This commit is contained in:
Matias Alejo Garcia 2014-10-31 12:25:00 -03:00
commit b12d12bff7
5 changed files with 41 additions and 33 deletions

View file

@ -16,6 +16,20 @@ angular.module('copayApp.controllers').controller('HeadController', function($sc
controllerUtils.logout();
};
$scope.refresh = function() {
var w = $rootScope.wallet;
if (!w) return;
if (w.isReady()) {
w.sendWalletReady();
if ($rootScope.addrInfos.length > 0) {
controllerUtils.clearBalanceCache(w);
controllerUtils.updateBalance(w, function() {
$rootScope.$digest();
});
}
}
};
// Ensures a graceful disconnect
window.onbeforeunload = function() {