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

@ -38,6 +38,7 @@ angular.module('copayApp.services').factory('Socket',
var ret = {};
var addrList = listeners
.filter(function(i) { return i.event != 'block'; })
.map(function(i) {return i.event;});
for (var i in addrList) {
@ -45,6 +46,9 @@ angular.module('copayApp.services').factory('Socket',
}
return ret;
},
isListeningBlocks: function() {
return listeners.filter(function(i) { return i.event == 'block'; }).length > 0;
},
emit: function(event, data, callback) {
socket.emit(event, data, function() {
var args = arguments;