fetch txs & compute balance immediately after switching wallets

This commit is contained in:
Ivan Socolsky 2014-10-31 14:57:51 -03:00
commit 29cbce6f7f

View file

@ -67,7 +67,13 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
if (controllerUtils.isFocusedWallet(wid)) return;
var w = $rootScope.iden.getWalletById(wid);
$scope.wallets.push(w);
controllerUtils.updateTxsAndBalance(w);
controllerUtils.updateTxs({
wallet: w,
pending: true
});
controllerUtils.updateBalance(w, function() {
$rootScope.$digest();
})
});
};
});