diff --git a/js/models/blockchain/Insight.js b/js/models/blockchain/Insight.js index 67b95fd7c..14825963d 100644 --- a/js/models/blockchain/Insight.js +++ b/js/models/blockchain/Insight.js @@ -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(); diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 5d21778b6..defc16fe2 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -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();