mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
feat: better backup errors (#2290)
Instead of creating error reports show the error to user use BackupVersion.unknown
This commit is contained in:
@@ -173,8 +173,19 @@ class RestoreFromBackupPage extends BasePage {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await restoreFromBackupViewModel.import(textEditingController.text);
|
||||
try {
|
||||
await restoreFromBackupViewModel.import(textEditingController.text);
|
||||
} catch (e) {
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
return AlertWithOneAction(
|
||||
alertTitle: S.current.error,
|
||||
alertContent: e.toString(),
|
||||
buttonText: S.of(context).ok,
|
||||
buttonAction: () => Navigator.of(context).pop());
|
||||
});
|
||||
}
|
||||
textEditingController.text = '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user