refreshing txs when switching wallets

This commit is contained in:
Ivan Socolsky 2014-10-31 12:17:28 -03:00
commit 69153757fb

View file

@ -67,12 +67,13 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
if (controllerUtils.isFocusedWallet(wid)) return; if (controllerUtils.isFocusedWallet(wid)) return;
var w = $rootScope.iden.getWalletById(wid); var w = $rootScope.iden.getWalletById(wid);
$scope.wallets.push(w); $scope.wallets.push(w);
controllerUtils.updateBalance(w, function(err, res) { controllerUtils.updateTxsAndBalance(w);
if (err) return; // controllerUtils.updateBalance(w, function(err, res) {
setTimeout(function() { // if (err) return;
$scope.$digest(); // setTimeout(function() {
}, 1); // $scope.$digest();
}); // }, 1);
// });
}); });
}; };
}); });