diff --git a/lib/src/screens/dashboard/widgets/menu_widget.dart b/lib/src/screens/dashboard/widgets/menu_widget.dart index fcf95d8a44..217e654925 100644 --- a/lib/src/screens/dashboard/widgets/menu_widget.dart +++ b/lib/src/screens/dashboard/widgets/menu_widget.dart @@ -114,6 +114,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 = Image.asset('assets/images/crypto/monero.webp'); diff --git a/lib/src/widgets/setting_actions.dart b/lib/src/widgets/setting_actions.dart index f42a4da960..cd8d563b4c 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 fc4ef7af32..281f7d5415 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -551,6 +551,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 &&