From 67d2b83fdf7cb2a6ac2b7c4cf6c32a05123577c8 Mon Sep 17 00:00:00 2001 From: Gabriel Masclef Date: Wed, 15 Nov 2017 11:36:53 -0300 Subject: [PATCH] Importing errors handled --- src/pages/add/import-wallet/import-wallet.html | 15 +++++++++++++++ src/pages/add/import-wallet/import-wallet.scss | 8 ++++++++ src/pages/add/import-wallet/import-wallet.ts | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/pages/add/import-wallet/import-wallet.html b/src/pages/add/import-wallet/import-wallet.html index 171d3684b..9ce78b639 100644 --- a/src/pages/add/import-wallet/import-wallet.html +++ b/src/pages/add/import-wallet/import-wallet.html @@ -14,6 +14,21 @@ + + +
Could not access the wallet at the server. Please check:
+
    +
  • The password of the recovery phrase (if set)
  • +
  • The derivation path
  • +
  • The wallet service URL
  • +
+ + NOTE: To import a wallet from a 3rd party software, please go to Add Wallet > Create Wallet, and specify the Recovery + Phrase there. + +
+
+
Type the recovery phrase (usually 12 words) diff --git a/src/pages/add/import-wallet/import-wallet.scss b/src/pages/add/import-wallet/import-wallet.scss index e69de29bb..1c3955833 100644 --- a/src/pages/add/import-wallet/import-wallet.scss +++ b/src/pages/add/import-wallet/import-wallet.scss @@ -0,0 +1,8 @@ +page-import-wallet { + .assertive { + color: color($colors, danger); + ion-label { + white-space: inherit; + } + } +} diff --git a/src/pages/add/import-wallet/import-wallet.ts b/src/pages/add/import-wallet/import-wallet.ts index b2fb89d8a..1527284dc 100644 --- a/src/pages/add/import-wallet/import-wallet.ts +++ b/src/pages/add/import-wallet/import-wallet.ts @@ -213,12 +213,12 @@ export class ImportWalletPage implements OnInit { this.onGoingProcessProvider.set('importingWallet', false); this.finish(wallet); }).catch((err: any) => { - this.onGoingProcessProvider.set('importingWallet', false); if (err instanceof this.errors.NOT_AUTHORIZED) { this.importErr = true; } else { this.popupProvider.ionicAlert('Error', err); // TODO: gettextcatalog } + this.onGoingProcessProvider.set('importingWallet', false); return; }); }, 100); @@ -236,6 +236,8 @@ export class ImportWalletPage implements OnInit { } else { this.popupProvider.ionicAlert('Error', err); // TODO: gettextcatalog } + this.onGoingProcessProvider.set('importingWallet', false); + return; }); }, 100); }