From 27f242a5ee251ce1a6961a5bf4a7e7945a93a586 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 8 Feb 2023 18:45:38 +0200 Subject: [PATCH] Use view model variable `hasRescan` instead [skip ci] --- lib/src/screens/settings/connection_sync_page.dart | 3 +-- lib/view_model/dashboard/dashboard_view_model.dart | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/screens/settings/connection_sync_page.dart b/lib/src/screens/settings/connection_sync_page.dart index bef196d60..9d2ce3cda 100644 --- a/lib/src/screens/settings/connection_sync_page.dart +++ b/lib/src/screens/settings/connection_sync_page.dart @@ -36,8 +36,7 @@ class ConnectionSyncPage extends BasePage { handler: (context) => _presentReconnectAlert(context), ), StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)), - if (dashboardViewModel.type != WalletType.bitcoin && - dashboardViewModel.type != WalletType.litecoin) + if (dashboardViewModel.hasRescan) SettingsCellWithArrow( title: S.current.rescan, handler: (context) => Navigator.of(context).pushNamed(Routes.rescan), diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 57720d92f..12bd21058 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -239,7 +239,7 @@ abstract class DashboardViewModelBase with Store { WalletBase, TransactionInfo> wallet; - bool get hasRescan => wallet.type == WalletType.monero; + bool get hasRescan => wallet.type == WalletType.monero || wallet.type == WalletType.haven; BalanceViewModel balanceViewModel;