From e383c6202a36fac5efa9646917d734d5440ce576 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Sat, 10 Aug 2024 22:46:09 -0500 Subject: [PATCH] fix cw wallet restores from backup --- .../stack_backup_views/helpers/restore_create_backup.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart index 3dcdd45d5..58c4aaef1 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart @@ -486,7 +486,13 @@ abstract class SWB { privateKey: privateKey, ); - await wallet.init(); + if (wallet is MoneroWallet /*|| wallet is WowneroWallet doesn't work.*/) { + await wallet.init(isRestore: true); + } else if (wallet is WowneroWallet) { + await wallet.init(isRestore: true); + } else { + await wallet.init(); + } int restoreHeight = walletbackup['restoreHeight'] as int? ?? 0; if (restoreHeight <= 0) {