From b54ad02c42a7a95abf9031d204014c56f559cbe8 Mon Sep 17 00:00:00 2001 From: tuxsudo Date: Mon, 22 Sep 2025 03:20:06 -0400 Subject: [PATCH] Add Wallet Connect to hamburger menu --- lib/src/screens/dashboard/widgets/menu_widget.dart | 3 +++ lib/src/widgets/setting_actions.dart | 10 ++++++++++ lib/view_model/dashboard/dashboard_view_model.dart | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/lib/src/screens/dashboard/widgets/menu_widget.dart b/lib/src/screens/dashboard/widgets/menu_widget.dart index b96f0e4cca..63c83bbab4 100644 --- a/lib/src/screens/dashboard/widgets/menu_widget.dart +++ b/lib/src/screens/dashboard/widgets/menu_widget.dart @@ -112,6 +112,9 @@ class MenuWidgetState extends State { if (!widget.dashboardViewModel.hasMweb) { items.removeWhere((element) => element.name(context) == S.of(context).litecoin_mweb_settings); } + if (!widget.dashboardViewModel.isEVM) { + items.removeWhere((element) => element.name(context) == S.of(context).walletConnect); + } int itemCount = items.length; moneroIcon = diff --git a/lib/src/widgets/setting_actions.dart b/lib/src/widgets/setting_actions.dart index ae0552e2ee..5102065569 100644 --- a/lib/src/widgets/setting_actions.dart +++ b/lib/src/widgets/setting_actions.dart @@ -22,6 +22,7 @@ class SettingActions { walletSettingAction, addressBookSettingAction, silentPaymentsSettingAction, + walletConnectSettingsAction, if (Platform.isIOS || Platform.isAndroid) litecoinMwebSettingAction, if (Platform.isIOS || Platform.isAndroid) exportOutputsAction, securityBackupSettingAction, @@ -31,6 +32,15 @@ class SettingActions { supportSettingAction, ]; + static SettingActions walletConnectSettingsAction = SettingActions._( + key: ValueKey('dashboard_page_menu_widget_wallet_connect_settings_button_key'), + name: (context) => S.of(context).walletConnect, + image: 'assets/images/walletconnect_logo.png', + onTap: (BuildContext context) { + Navigator.of(context).pushNamed(Routes.walletConnectConnectionsListing); + }, + ); + static SettingActions silentPaymentsSettingAction = SettingActions._( key: ValueKey('dashboard_page_menu_widget_silent_payment_settings_button_key'), name: (context) => S.of(context).silent_payments_settings, diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 3a6cf2d385..de561540ac 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -546,6 +546,10 @@ abstract class DashboardViewModelBase with Store { return errors; } + @computed + bool get + isEVM => (wallet.type == WalletType.ethereum) || (wallet.type == WalletType.solana) || (wallet.type == WalletType.polygon); + @computed bool get hasSilentPayments => wallet.type == WalletType.bitcoin &&