mirror of https://github.com/BTCPrivate/copay.git
fix incomple fix
This commit is contained in:
parent
04fe842b61
commit
7035657be8
|
@ -988,19 +988,21 @@ Wallet.prototype.netStart = function() {
|
||||||
secretNumber: self.secretNumber,
|
secretNumber: self.secretNumber,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var wasIncomplete;
|
||||||
if (this.publicKeyRing.isComplete()) {
|
if (this.publicKeyRing.isComplete()) {
|
||||||
this._lockIncomming(this.publicKeyRing.getAllCopayerIds());
|
this._lockIncomming(this.publicKeyRing.getAllCopayerIds());
|
||||||
} else {
|
} else {
|
||||||
//Partially complete wallet.
|
//Partially complete wallet.
|
||||||
if (this.publicKeyRing.getAllCopayerIds().length > 1) {
|
if (this.publicKeyRing.getAllCopayerIds().length > 1) {
|
||||||
this.network.setCopayers(this.publicKeyRing.getAllCopayerIds());
|
this.network.setCopayers(this.publicKeyRing.getAllCopayerIds());
|
||||||
|
wasIncomplete = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.debug('Wallet:' + self.id + ' Starting network.');
|
log.debug('Wallet:' + self.id + ' Starting network.');
|
||||||
this.network.start(startOpts, function() {
|
this.network.start(startOpts, function() {
|
||||||
//Partially complete wallet.
|
//Partially complete wallet.
|
||||||
if (self.publicKeyRing.getAllCopayerIds().length > 1) {
|
if (wasIncomplete) {
|
||||||
log.debug('Incomplete wallet opened:' + self.getName() + '. forced peer sync from 0');
|
log.debug('Incomplete wallet opened:' + self.getName() + '. forced peer sync from 0');
|
||||||
self.sendWalletReady(null, 0);
|
self.sendWalletReady(null, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue