From 381830d5afec192c665d90329e662ad7b68bcdad Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Mon, 22 Jul 2024 10:55:47 -0700 Subject: [PATCH] minor fix --- lib/src/screens/dashboard/pages/balance_page.dart | 4 ++-- lib/view_model/dashboard/dashboard_view_model.dart | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index 3c516e02d..ac08de33e 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -364,7 +364,7 @@ class CryptoBalanceWidget extends StatelessWidget { ), Observer( builder: (_) => StandardSwitch( - value: dashboardViewModel.mwebEnabled, + value: dashboardViewModel.mwebScanningActive, onTaped: () => _toggleMweb(context), ), ) @@ -423,7 +423,7 @@ class CryptoBalanceWidget extends StatelessWidget { } Future _toggleMweb(BuildContext context) async { - return dashboardViewModel.setMwebEnabled(!dashboardViewModel.mwebEnabled); + return dashboardViewModel.setMwebScanningActive(!dashboardViewModel.mwebScanningActive); } } diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index b11213741..f144bbaec 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -372,11 +372,12 @@ abstract class DashboardViewModelBase with Store { bool mwebScanningActive = false; @action - void setMwebEnabled(bool active) { + void setMwebScanningActive(bool active) { if (!hasMweb) { return; } + mwebScanningActive = active; bitcoin!.setMwebEnabled(wallet, active); }