move blockchain event handles to wallet

This commit is contained in:
Matias Alejo Garcia 2014-09-09 15:30:21 -03:00
commit b5b7acd5a4
4 changed files with 146 additions and 116 deletions

View file

@ -124,7 +124,12 @@ Insight.prototype.requestPost = function(path, data, cb) {
}
Insight.prototype.destroy = function() {
this.getSocket().destroy();
console.log('[Insight.js.127] INSIGHT destroy' ); //TODO
var socket = this.getSocket();
this.socket.disconnect();
this.socket.removeAllListeners();
this.socket = null;
this.subscribed = {};
this.status = this.STATUS.DESTROYED;
this.removeAllListeners();