fix subscribe

This commit is contained in:
Matias Alejo Garcia 2014-11-13 15:21:19 -03:00
commit d7d29c6ea7
2 changed files with 6 additions and 7 deletions

View file

@ -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
};