diff --git a/js/controllers/copayers.js b/js/controllers/copayers.js index cf3b880cc..57573b4d0 100644 --- a/js/controllers/copayers.js +++ b/js/controllers/copayers.js @@ -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); } - }); \ No newline at end of file + }); diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 06c2a08c5..c3508f539 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -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();