Merge pull request #2118 from matiu/pin

Pin
This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-12 11:50:43 -03:00
commit 376a36b68d
11 changed files with 52 additions and 30 deletions

View file

@ -498,6 +498,7 @@ PublicKeyRing.prototype.getCosigner = function(pubKey) {
PublicKeyRing.prototype.buildAddressCache = function() {
var ret = [];
var self = this;
_.each(this.indexes, function(index) {
for (var i = 0; i < index.receiveIndex; i++) {
self._getAddress(i, false, index.copayerIndex);

View file

@ -350,6 +350,7 @@ Wallet.prototype._onPublicKeyRing = function(senderId, data) {
}
if (this.publicKeyRing.isComplete()) {
this._lockIncomming();
this.subscribeToAddresses();
this.emitAndKeepAlive('ready');
} else {
this.emitAndKeepAlive('publicKeyRingUpdated');
@ -739,7 +740,7 @@ Wallet.prototype._onData = function(senderId, data, ts) {
this._onSignature(senderId, data);
break;
case 'indexes':
this._onIndexes(data.indexes);
this._onIndexes(senderId, data);
break;
case 'addressbook':
this._onAddressBook(senderId, data);