fix tx history refresh

This commit is contained in:
Matias Alejo Garcia 2015-07-06 10:40:40 -03:00
commit af41deb0e4

View file

@ -279,6 +279,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
return w.id != self.walletId; return w.id != self.walletId;
});; });;
$rootScope.$apply(); $rootScope.$apply();
if (opts.triggerTxUpdate) {
$timeout(function() {
self.updateTxHistory();
}, 1);
}
}); });
}); });
}; };
@ -771,10 +777,11 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}); });
$rootScope.$on('NewIncomingTx', function() { $rootScope.$on('NewIncomingTx', function() {
self.updateBalance(); self.updateAll({
$timeout(function() { walletStatus: null,
self.updateTxHistory(); untilItChanges: true,
}, 5000); triggerTxUpdate: true,
});
}); });
$rootScope.$on('NewOutgoingTx', function() { $rootScope.$on('NewOutgoingTx', function() {
@ -790,11 +797,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$on(eventName, function(event, untilItChanges) { $rootScope.$on(eventName, function(event, untilItChanges) {
self.updateAll({ self.updateAll({
walletStatus: null, walletStatus: null,
untilItChanges: untilItChanges untilItChanges: untilItChanges,
triggerTxUpdate: true,
}); });
$timeout(function() {
self.updateTxHistory();
}, 3000);
}); });
}); });