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(
builder: (_) => StandardSwitch(
value: dashboardViewModel.mwebEnabled,
value: dashboardViewModel.mwebScanningActive,
onTaped: () => _toggleMweb(context),
),
)
@ -423,7 +423,7 @@ class CryptoBalanceWidget extends StatelessWidget {
}
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;
@action
void setMwebEnabled(bool active) {
void setMwebScanningActive(bool active) {
if (!hasMweb) {
return;
}
mwebScanningActive = active;
bitcoin!.setMwebEnabled(wallet, active);
}