add update on network events to txproposals

This commit is contained in:
Matias Alejo Garcia 2014-04-25 17:53:19 -03:00
commit e46901c369
3 changed files with 16 additions and 2 deletions

View file

@ -6,6 +6,9 @@ angular.module('copay.transactions').controller('TransactionsController',
$scope.title = 'Transactions';
$scope.loading = false;
var _updateTxs = function() {
var w =$rootScope.wallet;
if (!w) return;
@ -99,4 +102,13 @@ angular.module('copay.transactions').controller('TransactionsController',
};
_updateTxs();
var w = $rootScope.wallet;
if (w) {
w.on('txProposalsUpdated', function() {
console.log('[transactions.js.108: txProposalsUpdated:]'); //TODO
_updateTxs();
$rootScope.$digest();
});
}
});