Merge pull request #1802 from matiu/fix/subscribe

fix subscribe
This commit is contained in:
Esteban Ordano 2014-11-13 15:28:40 -03:00
commit 125a728e8e
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
};

View File

@ -24,8 +24,9 @@
<i class="icon-arrow-down size-16 vm"></i>
</a>
<ul ng-show="hoverMenu" ng-class="{'hover': hoverMenu}">
<li><a class="text-gray size-16" href="#!/create" title="Add new wallet">
<i class="fi-plus m10r"></i> {{'Add new wallet'|translate}}</a></li>
<li>
<a class="text-gray size-16" href="#!/create" title="Create new wallet">
<i class="fi-plus m10r"></i> {{'Create new wallet'|translate}}</a></li>
<li><a class="text-gray size-16" href="#!/join" title="Join an existent wallet">
<i class="fi-torsos-all m10r"></i> {{'Join an existent wallet'|translate}}</a></li>
<li><a class="text-gray size-16" href="#!/import" title="Import a backup">