If the copayer upload a backup it does not wait for others
This commit is contained in:
parent
7618488bc3
commit
63cffcc921
4 changed files with 10 additions and 18 deletions
|
|
@ -2,12 +2,11 @@
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('ImportController',
|
angular.module('copayApp.controllers').controller('ImportController',
|
||||||
function($scope, $rootScope, $location, walletFactory, controllerUtils, Passphrase, notification) {
|
function($scope, $rootScope, $location, walletFactory, controllerUtils, Passphrase, notification) {
|
||||||
|
|
||||||
controllerUtils.redirIfLogged();
|
controllerUtils.redirIfLogged();
|
||||||
|
|
||||||
$scope.title = 'Import a backup';
|
$scope.title = 'Import a backup';
|
||||||
$scope.importStatus = 'Importing wallet - Reading backup...';
|
$scope.importStatus = 'Importing wallet - Reading backup...';
|
||||||
$scope.hideAdv=true;
|
$scope.hideAdv = true;
|
||||||
|
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
|
|
||||||
|
|
@ -59,7 +58,7 @@ angular.module('copayApp.controllers').controller('ImportController',
|
||||||
$rootScope.wallet = w;
|
$rootScope.wallet = w;
|
||||||
controllerUtils.startNetwork($rootScope.wallet, $scope);
|
controllerUtils.startNetwork($rootScope.wallet, $scope);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -105,6 +104,6 @@ angular.module('copayApp.controllers').controller('ImportController',
|
||||||
|
|
||||||
if (backupFile) {
|
if (backupFile) {
|
||||||
reader.readAsBinaryString(backupFile);
|
reader.readAsBinaryString(backupFile);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,9 @@ function Wallet(opts) {
|
||||||
this.lastTimestamp = opts.lastTimestamp || undefined;
|
this.lastTimestamp = opts.lastTimestamp || undefined;
|
||||||
this.lastMessageFrom = {};
|
this.lastMessageFrom = {};
|
||||||
|
|
||||||
|
//to avoid confirmation of copayer's backups if is imported from a file
|
||||||
|
this.isImported = opts.isImported;
|
||||||
|
|
||||||
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
|
||||||
|
|
@ -867,6 +870,7 @@ Wallet.fromObj = function(o, storage, network, blockchain) {
|
||||||
opts.storage = storage;
|
opts.storage = storage;
|
||||||
opts.network = network;
|
opts.network = network;
|
||||||
opts.blockchain = blockchain;
|
opts.blockchain = blockchain;
|
||||||
|
opts.isImported = true;
|
||||||
|
|
||||||
return new Wallet(opts);
|
return new Wallet(opts);
|
||||||
};
|
};
|
||||||
|
|
@ -2389,7 +2393,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();
|
var ret = this.publicKeyRing.isComplete() && (this.publicKeyRing.isFullyBackup() || this.isImported);
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -2522,4 +2526,4 @@ Wallet.request = function(options, callback) {
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Wallet;
|
module.exports = Wallet;
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ angular.module('copayApp.services')
|
||||||
}, 3000);
|
}, 3000);
|
||||||
});
|
});
|
||||||
w.on('txProposalEvent', function(e) {
|
w.on('txProposalEvent', function(e) {
|
||||||
|
|
||||||
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
|
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
case 'signed':
|
case 'signed':
|
||||||
|
|
|
||||||
|
|
@ -75,17 +75,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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()"
|
<a class="small" ng-click="skipBackup()"
|
||||||
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
||||||
ng-disabled="!$root.wallet.publicKeyRing.isComplete()">
|
ng-disabled="!$root.wallet.publicKeyRing.isComplete()">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue