Skip avoid waiting for other copayers

This commit is contained in:
Matias Pando 2014-09-12 13:25:52 -03:00
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() { $scope.skipBackup = function() {
var w = $rootScope.wallet; var w = $rootScope.wallet;
w.setBackupReady(); w.setBackupReady(true);
}; };
$scope.backup = function() { $scope.backup = function() {
@ -43,4 +43,4 @@ angular.module('copayApp.controllers').controller('CopayersController',
return $rootScope.wallet.publicKeyRing.isBackupReady(copayer.copayerId); 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 //to avoid confirmation of copayer's backups if is imported from a file
this.isImported = opts.isImported || false; 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 || {}; this.paymentRequests = opts.paymentRequests || {};
//network nonces are 8 byte buffers, representing a big endian number //network nonces are 8 byte buffers, representing a big endian number
@ -2430,7 +2433,7 @@ Wallet.prototype.isShared = function() {
* @return {boolean} * @return {boolean}
*/ */
Wallet.prototype.isReady = function() { 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; return ret;
}; };
@ -2439,7 +2442,8 @@ Wallet.prototype.isReady = function() {
* *
* Also backs up the wallet * Also backs up the wallet
*/ */
Wallet.prototype.setBackupReady = function() { Wallet.prototype.setBackupReady = function(forcedLogin) {
this.forcedLogin = forcedLogin;
this.publicKeyRing.setBackupReady(); this.publicKeyRing.setBackupReady();
this.sendPublicKeyRing(); this.sendPublicKeyRing();
this.store(); this.store();