change locking order

This commit is contained in:
Matias Alejo Garcia 2014-04-28 15:15:09 -03:00
commit 8138eaed7b

View file

@ -53,12 +53,12 @@ Wallet.prototype._handlePublicKeyRing = function(senderId, data, isInbound) {
var hasChanged = pkr.merge(inPKR, true);
if (hasChanged) {
this.log('### BROADCASTING PKR');
recipients = null;
this.sendPublicKeyRing(recipients);
if (this.publicKeyRing.isComplete()) {
this._lockIncomming();
}
this.log('### BROADCASTING PKR');
recipients = null;
this.sendPublicKeyRing(recipients);
}
this.emit('publicKeyRingUpdated', this.publicKeyRing);
this.store();