From d7d29c6ea722019aae89b324ea96ddf9f7a6df2c Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 13 Nov 2014 15:21:19 -0300 Subject: [PATCH] fix subscribe --- js/models/Wallet.js | 8 +++----- views/includes/head.html | 5 +++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/js/models/Wallet.js b/js/models/Wallet.js index 2a60fdfa6..93524e0c2 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -247,10 +247,7 @@ Wallet.prototype.seedCopayer = function(pubKey) { Wallet.prototype._newAddresses = function(dontUpdateUx) { - if (this.publicKeyRing.isComplete()) { - this.subscribeToAddresses(); - - }; + this.subscribeToAddresses(); this.emitAndKeepAlive('newAddresses', dontUpdateUx); }; @@ -2182,8 +2179,9 @@ Wallet.prototype.getAddressesStr = function(opts) { }; Wallet.prototype.subscribeToAddresses = function() { + if (!this.publicKeyRing.isComplete()) return; + var addrInfo = this.publicKeyRing.getAddressesInfo(); -console.log('[Wallet.js.2181:addrInfo:]',addrInfo); //TODO this.blockchain.subscribe(_.pluck(addrInfo, 'addressStr')); log.debug('Subscribed to ' + addrInfo.length + ' addresses'); //TODO }; diff --git a/views/includes/head.html b/views/includes/head.html index 80705cedc..7f85fecfb 100644 --- a/views/includes/head.html +++ b/views/includes/head.html @@ -24,8 +24,9 @@