From b7373367a18f431f9fa3b4e8aa9900775f7dde0a Mon Sep 17 00:00:00 2001 From: Matias Pando Date: Fri, 12 Sep 2014 13:25:52 -0300 Subject: [PATCH] Skip avoid waiting for other copayers --- js/controllers/copayers.js | 4 ++-- js/models/core/Wallet.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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();