mirror of https://github.com/BTCPrivate/copay.git
Importing errors handled
This commit is contained in:
parent
e07a584816
commit
67d2b83fdf
|
@ -14,6 +14,21 @@
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
|
|
||||||
|
<ion-card (click)="importErr = false">
|
||||||
|
<ion-item *ngIf="importErr" class="assertive">
|
||||||
|
<div translate>Could not access the wallet at the server. Please check:</div>
|
||||||
|
<ul>
|
||||||
|
<li translate>The password of the recovery phrase (if set)</li>
|
||||||
|
<li translate>The derivation path</li>
|
||||||
|
<li translate>The wallet service URL</li>
|
||||||
|
</ul>
|
||||||
|
<small translate>
|
||||||
|
NOTE: To import a wallet from a 3rd party software, please go to Add Wallet > Create Wallet, and specify the Recovery
|
||||||
|
Phrase there.
|
||||||
|
</small>
|
||||||
|
</ion-item>
|
||||||
|
</ion-card>
|
||||||
|
|
||||||
<form [formGroup]="importForm" (ngSubmit)="import()">
|
<form [formGroup]="importForm" (ngSubmit)="import()">
|
||||||
<ion-item *ngIf="selectedTab == 'words'">
|
<ion-item *ngIf="selectedTab == 'words'">
|
||||||
<ion-label stacked>Type the recovery phrase (usually 12 words)</ion-label>
|
<ion-label stacked>Type the recovery phrase (usually 12 words)</ion-label>
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
page-import-wallet {
|
||||||
|
.assertive {
|
||||||
|
color: color($colors, danger);
|
||||||
|
ion-label {
|
||||||
|
white-space: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -213,12 +213,12 @@ export class ImportWalletPage implements OnInit {
|
||||||
this.onGoingProcessProvider.set('importingWallet', false);
|
this.onGoingProcessProvider.set('importingWallet', false);
|
||||||
this.finish(wallet);
|
this.finish(wallet);
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
this.onGoingProcessProvider.set('importingWallet', false);
|
|
||||||
if (err instanceof this.errors.NOT_AUTHORIZED) {
|
if (err instanceof this.errors.NOT_AUTHORIZED) {
|
||||||
this.importErr = true;
|
this.importErr = true;
|
||||||
} else {
|
} else {
|
||||||
this.popupProvider.ionicAlert('Error', err); // TODO: gettextcatalog
|
this.popupProvider.ionicAlert('Error', err); // TODO: gettextcatalog
|
||||||
}
|
}
|
||||||
|
this.onGoingProcessProvider.set('importingWallet', false);
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
@ -236,6 +236,8 @@ export class ImportWalletPage implements OnInit {
|
||||||
} else {
|
} else {
|
||||||
this.popupProvider.ionicAlert('Error', err); // TODO: gettextcatalog
|
this.popupProvider.ionicAlert('Error', err); // TODO: gettextcatalog
|
||||||
}
|
}
|
||||||
|
this.onGoingProcessProvider.set('importingWallet', false);
|
||||||
|
return;
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue