Only update TXs & balance once after changes to proposals

This commit is contained in:
Ivan Socolsky 2014-10-06 18:58:45 -03:00
commit 7053c322c9

View file

@ -100,17 +100,17 @@ angular.module('copayApp.services')
$rootScope.$digest(); $rootScope.$digest();
}); });
w.on('txProposalsUpdated', function(dontDigest) { var updateTxsAndBalance = _.debounce(function() {
root.updateTxs(); root.updateTxs();
// give sometime to the tx to propagate. root.updateBalance(function() {
$timeout(function() { $rootScope.$digest();
root.updateBalance(function() { })
if (!dontDigest) { }, 3000);
$rootScope.$digest();
} w.on('txProposalsUpdated', function(dontDigest) {
}); updateTxsAndBalance();
}, 3000);
}); });
w.on('txProposalEvent', function(e) { w.on('txProposalEvent', function(e) {
var user = w.publicKeyRing.nicknameForCopayer(e.cId); var user = w.publicKeyRing.nicknameForCopayer(e.cId);