mirror of https://github.com/BTCPrivate/copay.git
fix/import
This commit is contained in:
parent
81527aa028
commit
69daee6ed1
|
@ -28,8 +28,7 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
|
|||
passphraseConfig: config.passphraseConfig,
|
||||
}, function(err, iden) {
|
||||
if (err && !iden) {
|
||||
controllerUtils.onErrorDigest(
|
||||
$scope, (err.toString() || '').match('BADSTR') ? 'Bad password or corrupt profile file' : 'Unknown error');
|
||||
$scope.error = (err.toString() || '').match('BADSTR') ? 'Bad password or corrupt profile file' : 'Unknown error';
|
||||
} else {
|
||||
notification.info('Success', 'Profile imported successfully');
|
||||
$location.path('/');
|
||||
|
@ -59,7 +58,7 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
|
|||
|
||||
if (form.$invalid) {
|
||||
$scope.loading = false;
|
||||
notification.error('Error', 'There is an error in the form.');
|
||||
$scope.error = 'Please enter the required fields';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -69,8 +68,7 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
|
|||
|
||||
if (!backupFile && !backupText) {
|
||||
$scope.loading = false;
|
||||
notification.error('Error', 'Please, select your backup file');
|
||||
$scope.loading = false;
|
||||
$scope.error = 'Please, select your backup file';
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
<h1><span translate>Import Profile<span></h1>
|
||||
|
||||
<form name="importProfileForm" ng-submit="import(importProfileForm)" novalidate>
|
||||
<p class="text-warning size-12"
|
||||
ng-show="error">
|
||||
<i class="fi-x"></i>
|
||||
{{error|translate}}
|
||||
</p>
|
||||
|
||||
|
||||
<div ng-show="!is_iOS">
|
||||
<legend for="backupFile" class="m10b">
|
||||
<span translate>Choose backup file from your computer</span> <i class="fi-laptop"></i>
|
||||
|
|
Loading…
Reference in New Issue