fix invalid wallet pointer getting set even when we throw (#1556)

* fix invalid wallet pointer getting set even when we throw

* Hide "wallet seeds" field if there is no seeds (cases of restore from keys)

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
cyan
2024-07-26 18:36:18 +03:00
committed by GitHub
co-authored by OmarHatem
parent d5fca1969e
commit eb8158e996
3 changed files with 53 additions and 37 deletions
+6 -6
View File
@@ -83,8 +83,8 @@ abstract class WalletKeysViewModelBase with Store {
StandartListItem(
title: S.current.view_key_private,
value: keys['privateViewKey']!),
StandartListItem(
title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
if (_appStore.wallet!.seed!.isNotEmpty)
StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
]);
if (_appStore.wallet?.seed != null &&
@@ -123,8 +123,8 @@ abstract class WalletKeysViewModelBase with Store {
StandartListItem(
title: S.current.view_key_private,
value: keys['privateViewKey']!),
StandartListItem(
title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
if (_appStore.wallet!.seed!.isNotEmpty)
StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
]);
}
@@ -147,8 +147,8 @@ abstract class WalletKeysViewModelBase with Store {
StandartListItem(
title: S.current.view_key_private,
value: keys['privateViewKey']!),
StandartListItem(
title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
if (_appStore.wallet!.seed!.isNotEmpty)
StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
]);
if (_appStore.wallet?.seed != null &&