Refresh balance on new block

This commit is contained in:
Yemel Jardi 2014-06-23 14:57:23 -03:00
commit e1dc275ddd
2 changed files with 13 additions and 0 deletions

View file

@ -292,6 +292,15 @@ angular.module('copayApp.services')
});
});
});
if (!$rootScope.wallet.spendUnconfirmed && !Socket.isListeningBlocks()) {
Socket.emit('subscribe', 'inv');
Socket.on('block', function(block) {
root.updateBalance(function() {
$rootScope.$digest();
});
});
}
};
return root;
});