move blockchain event handles to wallet

This commit is contained in:
Matias Alejo Garcia 2014-09-09 15:30:21 -03:00
commit 6944b9119b
2 changed files with 6 additions and 3 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();

View file

@ -146,7 +146,6 @@ angular.module('copayApp.services')
});
};
root.startNetwork = function(w, $scope) {
root.setupRootVariables();
root.installWalletHandlers(w, $scope);
@ -274,7 +273,6 @@ angular.module('copayApp.services')
});
}
// TODO Move this to wallet model!
root.updateGlobalAddresses = function() {
if (!$rootScope.wallet) return;
root.updateAddressList();