fix refresh btn position

This commit is contained in:
bechi 2014-10-31 12:14:47 -03:00
commit da5aa14487
3 changed files with 19 additions and 3 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() {