From 2e6ac40e205724541beb479356b85d9cf7f66e1c Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 30 Jan 2024 12:45:39 -0600 Subject: [PATCH] fix 'cannot cast Null to String' --- .../stack_backup_views/helpers/restore_create_backup.dart | 4 +++- 1 file changed, 3 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 c47630279..4dec9dac7 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 @@ -406,7 +406,9 @@ abstract class SWB { if (walletbackup['mnemonic'] == null) { // probably private key based - privateKey = walletbackup['privateKey'] as String; + if (walletbackup['privateKey'] != null) { + privateKey = walletbackup['privateKey'] as String; + } } else { if (walletbackup['mnemonic'] is List) { List mnemonicList = (walletbackup['mnemonic'] as List)