Merge pull request #51 from matiaspando/feature/identity
adding message publicKeyRingUpdated
This commit is contained in:
commit
5a5a15e4ea
2 changed files with 14 additions and 1 deletions
|
|
@ -390,6 +390,10 @@ Identity.prototype.bindWallet = function(w) {
|
||||||
log.debug('<addressBookUpdated> Wallet' + w.getName());
|
log.debug('<addressBookUpdated> Wallet' + w.getName());
|
||||||
self.storeWallet(w);
|
self.storeWallet(w);
|
||||||
});
|
});
|
||||||
|
w.on('publicKeyRingUpdated', function() {
|
||||||
|
log.debug('<publicKeyRingUpdated> Wallet' + w.getName());
|
||||||
|
self.storeWallet(w);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,14 @@ Wallet.prototype._newAddresses = function(dontUpdateUx) {
|
||||||
this.emitAndKeepAlive('newAddresses', dontUpdateUx);
|
this.emitAndKeepAlive('newAddresses', dontUpdateUx);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Wallet.prototype._publicKeyRingUpdated = function(isComplete) {
|
||||||
|
if (isComplete) {
|
||||||
|
this.subscribeToAddresses();
|
||||||
|
};
|
||||||
|
this.emitAndKeepAlive('publicKeyRingUpdated');
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc Handles an 'indexes' message.
|
* @desc Handles an 'indexes' message.
|
||||||
*
|
*
|
||||||
|
|
@ -321,7 +329,8 @@ Wallet.prototype._onPublicKeyRing = function(senderId, data) {
|
||||||
if (this.publicKeyRing.isComplete()) {
|
if (this.publicKeyRing.isComplete()) {
|
||||||
this._lockIncomming();
|
this._lockIncomming();
|
||||||
}
|
}
|
||||||
this._newAddresses();
|
|
||||||
|
this._publicKeyRingUpdated(this.publicKeyRing.isComplete());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue