Skip avoid waiting for other copayers

This commit is contained in:
Matias Pando 2014-09-12 13:25:52 -03:00
parent da08f52d67
commit b7373367a1
2 changed files with 8 additions and 4 deletions

View File

@ -8,7 +8,7 @@ angular.module('copayApp.controllers').controller('CopayersController',
$scope.skipBackup = function() {
var w = $rootScope.wallet;
w.setBackupReady();
w.setBackupReady(true);
};
$scope.backup = function() {
@ -43,4 +43,4 @@ angular.module('copayApp.controllers').controller('CopayersController',
return $rootScope.wallet.publicKeyRing.isBackupReady(copayer.copayerId);
}
});
});

View File

@ -89,6 +89,9 @@ function Wallet(opts) {
//to avoid confirmation of copayer's backups if is imported from a file
this.isImported = opts.isImported || false;
//to avoid waiting others copayers to make a backup and login immediatly
this.forcedLogin = opts.forcedLogin || false;
this.paymentRequests = opts.paymentRequests || {};
//network nonces are 8 byte buffers, representing a big endian number
@ -2430,7 +2433,7 @@ Wallet.prototype.isShared = function() {
* @return {boolean}
*/
Wallet.prototype.isReady = function() {
var ret = this.publicKeyRing.isComplete() && (this.publicKeyRing.isFullyBackup() || this.isImported);
var ret = this.publicKeyRing.isComplete() && (this.publicKeyRing.isFullyBackup() || this.isImported || this.forcedLogin);
return ret;
};
@ -2439,7 +2442,8 @@ Wallet.prototype.isReady = function() {
*
* Also backs up the wallet
*/
Wallet.prototype.setBackupReady = function() {
Wallet.prototype.setBackupReady = function(forcedLogin) {
this.forcedLogin = forcedLogin;
this.publicKeyRing.setBackupReady();
this.sendPublicKeyRing();
this.store();