mirror of https://github.com/BTCPrivate/copay.git
If the copayer upload a backup it does not wait for others
This commit is contained in:
parent
84dbcb038a
commit
ecea1a654d
|
@ -2,12 +2,11 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('ImportController',
|
||||
function($scope, $rootScope, $location, walletFactory, controllerUtils, Passphrase, notification) {
|
||||
|
||||
controllerUtils.redirIfLogged();
|
||||
|
||||
$scope.title = 'Import a backup';
|
||||
$scope.importStatus = 'Importing wallet - Reading backup...';
|
||||
$scope.hideAdv=true;
|
||||
$scope.hideAdv = true;
|
||||
|
||||
var reader = new FileReader();
|
||||
|
||||
|
@ -59,7 +58,7 @@ angular.module('copayApp.controllers').controller('ImportController',
|
|||
$rootScope.wallet = w;
|
||||
controllerUtils.startNetwork($rootScope.wallet, $scope);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -105,6 +104,6 @@ angular.module('copayApp.controllers').controller('ImportController',
|
|||
|
||||
if (backupFile) {
|
||||
reader.readAsBinaryString(backupFile);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -86,6 +86,9 @@ function Wallet(opts) {
|
|||
this.lastTimestamp = opts.lastTimestamp || undefined;
|
||||
this.lastMessageFrom = {};
|
||||
|
||||
//to avoid confirmation of copayer's backups if is imported from a file
|
||||
this.isImported = opts.isImported;
|
||||
|
||||
this.paymentRequests = opts.paymentRequests || {};
|
||||
|
||||
//network nonces are 8 byte buffers, representing a big endian number
|
||||
|
@ -910,6 +913,7 @@ Wallet.fromObj = function(o, storage, network, blockchain) {
|
|||
opts.storage = storage;
|
||||
opts.network = network;
|
||||
opts.blockchain = blockchain;
|
||||
opts.isImported = true;
|
||||
|
||||
return new Wallet(opts);
|
||||
};
|
||||
|
@ -2426,7 +2430,7 @@ Wallet.prototype.isShared = function() {
|
|||
* @return {boolean}
|
||||
*/
|
||||
Wallet.prototype.isReady = function() {
|
||||
var ret = this.publicKeyRing.isComplete() && this.publicKeyRing.isFullyBackup();
|
||||
var ret = this.publicKeyRing.isComplete() && (this.publicKeyRing.isFullyBackup() || this.isImported);
|
||||
return ret;
|
||||
};
|
||||
|
||||
|
|
|
@ -75,17 +75,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="text-right">
|
||||
<button class="button secondary m0"
|
||||
ng-click="skipBackup()"
|
||||
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
||||
ng-disabled="!$root.wallet.publicKeyRing.isComplete()">
|
||||
<span translate ng-show="$root.wallet.publicKeyRing.isComplete()" >
|
||||
Skip Backup
|
||||
</span>
|
||||
</button> -->
|
||||
|
||||
<a class="small" ng-click="skipBackup()"
|
||||
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
||||
ng-disabled="!$root.wallet.publicKeyRing.isComplete()">
|
||||
|
|
Loading…
Reference in New Issue