minor fix

This commit is contained in:
Matthew Fosse 2024-07-22 10:55:47 -07:00
parent 8e6901118a
commit 381830d5af
2 changed files with 4 additions and 3 deletions

View file

@ -364,7 +364,7 @@ class CryptoBalanceWidget extends StatelessWidget {
), ),
Observer( Observer(
builder: (_) => StandardSwitch( builder: (_) => StandardSwitch(
value: dashboardViewModel.mwebEnabled, value: dashboardViewModel.mwebScanningActive,
onTaped: () => _toggleMweb(context), onTaped: () => _toggleMweb(context),
), ),
) )
@ -423,7 +423,7 @@ class CryptoBalanceWidget extends StatelessWidget {
} }
Future<void> _toggleMweb(BuildContext context) async { Future<void> _toggleMweb(BuildContext context) async {
return dashboardViewModel.setMwebEnabled(!dashboardViewModel.mwebEnabled); return dashboardViewModel.setMwebScanningActive(!dashboardViewModel.mwebScanningActive);
} }
} }

View file

@ -372,11 +372,12 @@ abstract class DashboardViewModelBase with Store {
bool mwebScanningActive = false; bool mwebScanningActive = false;
@action @action
void setMwebEnabled(bool active) { void setMwebScanningActive(bool active) {
if (!hasMweb) { if (!hasMweb) {
return; return;
} }
mwebScanningActive = active;
bitcoin!.setMwebEnabled(wallet, active); bitcoin!.setMwebEnabled(wallet, active);
} }