mirror of https://github.com/BTCPrivate/copay.git
adding message publicKeyRingUpdated
This commit is contained in:
parent
a93a48dc60
commit
31cab73193
|
@ -390,6 +390,10 @@ Identity.prototype.bindWallet = function(w) {
|
|||
log.debug('<addressBookUpdated> Wallet' + w.getName());
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
Wallet.prototype._publicKeyRingUpdated = function(isComplete) {
|
||||
if (isComplete) {
|
||||
this.subscribeToAddresses();
|
||||
};
|
||||
this.emitAndKeepAlive('publicKeyRingUpdated');
|
||||
};
|
||||
|
||||
/**
|
||||
* @desc Handles an 'indexes' message.
|
||||
*
|
||||
|
@ -321,7 +329,8 @@ Wallet.prototype._onPublicKeyRing = function(senderId, data) {
|
|||
if (this.publicKeyRing.isComplete()) {
|
||||
this._lockIncomming();
|
||||
}
|
||||
this._newAddresses();
|
||||
|
||||
this._publicKeyRingUpdated(this.publicKeyRing.isComplete());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue