mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Better handle backup errors (#2132)
This commit is contained in:
parent
c223510438
commit
b1e5d1503e
2 changed files with 13 additions and 5 deletions
|
@ -198,7 +198,7 @@ class BackupServiceV3 extends $BackupService {
|
|||
final version = getVersionFile(file);
|
||||
switch (version) {
|
||||
case BackupVersion.unknown:
|
||||
throw Exception('Invalid backup file: unknown version');
|
||||
throw Exception('unknown_backup_version');
|
||||
case BackupVersion.v1:
|
||||
final data = file.readAsBytesSync();
|
||||
final backupBytes = data.toList()..removeAt(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue