diff --git a/js/models/blockchain/Insight.js b/js/models/blockchain/Insight.js index 14825963d..67b95fd7c 100644 --- a/js/models/blockchain/Insight.js +++ b/js/models/blockchain/Insight.js @@ -124,12 +124,7 @@ Insight.prototype.requestPost = function(path, data, cb) { } Insight.prototype.destroy = function() { - -console.log('[Insight.js.127] INSIGHT destroy' ); //TODO - var socket = this.getSocket(); - this.socket.disconnect(); - this.socket.removeAllListeners(); - this.socket = null; + this.getSocket().destroy(); this.subscribed = {}; this.status = this.STATUS.DESTROYED; this.removeAllListeners(); diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 5d21778b6..1059a4ff6 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -282,7 +282,7 @@ angular.module('copayApp.services') var allAddrs = $rootScope.addrInfos; var newAddrs = []; - for (var i in allAddrs) { + for:(var i in allAddrs) { var a = allAddrs[i]; if (!currentAddrs[a.addressStr] && !a.isChange) newAddrs.push(a.addressStr);