Merge pull request #1650 from isocolsky/fixes

fetch txs & compute balance immediately after switching wallets
This commit is contained in:
Matias Alejo Garcia 2014-10-31 15:53:02 -03:00
commit b1b4b0c017
1 changed files with 7 additions and 1 deletions

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();
})
});
};
});