fix incomple fix

This commit is contained in:
Matias Alejo Garcia 2015-02-09 09:55:13 -03:00
parent 04fe842b61
commit 7035657be8
1 changed files with 3 additions and 1 deletions

View File

@ -988,19 +988,21 @@ Wallet.prototype.netStart = function() {
secretNumber: self.secretNumber,
};
var wasIncomplete;
if (this.publicKeyRing.isComplete()) {
this._lockIncomming(this.publicKeyRing.getAllCopayerIds());
} else {
//Partially complete wallet.
if (this.publicKeyRing.getAllCopayerIds().length > 1) {
this.network.setCopayers(this.publicKeyRing.getAllCopayerIds());
wasIncomplete = true;
}
}
log.debug('Wallet:' + self.id + ' Starting network.');
this.network.start(startOpts, function() {
//Partially complete wallet.
if (self.publicKeyRing.getAllCopayerIds().length > 1) {
if (wasIncomplete) {
log.debug('Incomplete wallet opened:' + self.getName() + '. forced peer sync from 0');
self.sendWalletReady(null, 0);
}