diff --git a/assets/translations/en.json b/assets/translations/en.json index b33edc6036..77da44da93 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -381,6 +381,8 @@ "trezorSelectSubTitle": "Select a hardware wallet you'd like to use with Komodo Wallet", "trezorBrowserUnsupported": "Trezor is not supported on this browser.\nPlease use Chrome for Trezor functionality.", "trezorTransactionInProgressMessage": "Please confirm transaction on your Trezor device", + "trezorWalletModeOnly": "Only wallet mode supported currently", + "trezorUnavailableTooltip": "Not available with Trezor currently", "mixedCaseError": "If you are using non mixed case address, please try to convert to mixed case one.", "addressConvertedToMixedCase": "Address automatically converted to mixed-case for checksum validation.", "invalidAddressChecksum": "Invalid address checksum", diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index aeadb58ad1..3410ec5433 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -377,6 +377,8 @@ abstract class LocaleKeys { static const trezorSelectSubTitle = 'trezorSelectSubTitle'; static const trezorBrowserUnsupported = 'trezorBrowserUnsupported'; static const trezorTransactionInProgressMessage = 'trezorTransactionInProgressMessage'; + static const trezorWalletModeOnly = 'trezorWalletModeOnly'; + static const trezorUnavailableTooltip = 'trezorUnavailableTooltip'; static const mixedCaseError = 'mixedCaseError'; static const addressConvertedToMixedCase = 'addressConvertedToMixedCase'; static const invalidAddressChecksum = 'invalidAddressChecksum'; diff --git a/lib/views/common/hw_wallet_dialog/hw_dialog_init.dart b/lib/views/common/hw_wallet_dialog/hw_dialog_init.dart index 42b3117be4..ece3942686 100644 --- a/lib/views/common/hw_wallet_dialog/hw_dialog_init.dart +++ b/lib/views/common/hw_wallet_dialog/hw_dialog_init.dart @@ -24,6 +24,11 @@ class HwDialogInit extends StatelessWidget { } }, ), + const SizedBox(height: 8), + Text( + LocaleKeys.trezorWalletModeOnly.tr(), + textAlign: TextAlign.center, + ), Padding( padding: const EdgeInsets.only(top: 12), child: UiUnderlineTextButton( diff --git a/lib/views/common/main_menu/main_menu_bar_mobile.dart b/lib/views/common/main_menu/main_menu_bar_mobile.dart index 71bbaf4759..fdcaf4bbb6 100644 --- a/lib/views/common/main_menu/main_menu_bar_mobile.dart +++ b/lib/views/common/main_menu/main_menu_bar_mobile.dart @@ -17,6 +17,7 @@ class MainMenuBarMobile extends StatelessWidget { Widget build(BuildContext context) { final MainMenuValue selected = routingState.selectedMenu; final currentWallet = context.watch().state.currentUser?.wallet; + final bool isHardware = currentWallet?.isHW == true; return BlocBuilder( builder: (context, state) { @@ -50,17 +51,22 @@ class MainMenuBarMobile extends StatelessWidget { ), ), Expanded( - child: MainMenuBarMobileItem( - value: MainMenuValue.fiat, - enabled: currentWallet?.isHW != true, - isActive: selected == MainMenuValue.fiat, + child: Tooltip( + message: '', + child: MainMenuBarMobileItem( + value: MainMenuValue.fiat, + enabled: true, + isActive: selected == MainMenuValue.fiat, + ), ), ), Expanded( child: Tooltip( - message: tradingEnabled - ? '' - : LocaleKeys.tradingDisabledTooltip.tr(), + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : (tradingEnabled + ? '' + : LocaleKeys.tradingDisabledTooltip.tr()), child: MainMenuBarMobileItem( value: MainMenuValue.dex, enabled: currentWallet?.isHW != true, @@ -70,9 +76,11 @@ class MainMenuBarMobile extends StatelessWidget { ), Expanded( child: Tooltip( - message: tradingEnabled - ? '' - : LocaleKeys.tradingDisabledTooltip.tr(), + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : (tradingEnabled + ? '' + : LocaleKeys.tradingDisabledTooltip.tr()), child: MainMenuBarMobileItem( value: MainMenuValue.bridge, enabled: currentWallet?.isHW != true, @@ -83,9 +91,11 @@ class MainMenuBarMobile extends StatelessWidget { if (isMMBotEnabled) Expanded( child: Tooltip( - message: tradingEnabled - ? '' - : LocaleKeys.tradingDisabledTooltip.tr(), + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : (tradingEnabled + ? '' + : LocaleKeys.tradingDisabledTooltip.tr()), child: MainMenuBarMobileItem( enabled: currentWallet?.isHW != true, value: MainMenuValue.marketMakerBot, @@ -95,7 +105,8 @@ class MainMenuBarMobile extends StatelessWidget { ), Expanded( child: Tooltip( - message: LocaleKeys.nftDisabledTooltip.tr(), + message: + isHardware ? LocaleKeys.trezorUnavailableTooltip.tr() : LocaleKeys.nftDisabledTooltip.tr(), child: MainMenuBarMobileItem( value: MainMenuValue.nft, enabled: false, diff --git a/lib/views/common/main_menu/main_menu_desktop.dart b/lib/views/common/main_menu/main_menu_desktop.dart index 364ef7956e..d3964c551c 100644 --- a/lib/views/common/main_menu/main_menu_desktop.dart +++ b/lib/views/common/main_menu/main_menu_desktop.dart @@ -43,6 +43,7 @@ class _MainMenuDesktopState extends State { .isEnabled; final SettingsBloc settings = context.read(); final currentWallet = state.currentUser?.wallet; + final bool isHardware = currentWallet?.isHW == true; return Container( height: double.infinity, @@ -83,19 +84,24 @@ class _MainMenuDesktopState extends State { MainMenuValue.wallet, ), ), - DesktopMenuDesktopItem( - key: const Key('main-menu-fiat'), - enabled: currentWallet?.isHW != true, - menu: MainMenuValue.fiat, - onTap: onTapItem, - isSelected: _checkSelectedItem( - MainMenuValue.fiat, + Tooltip( + message: '', + child: DesktopMenuDesktopItem( + key: const Key('main-menu-fiat'), + enabled: true, + menu: MainMenuValue.fiat, + onTap: onTapItem, + isSelected: _checkSelectedItem( + MainMenuValue.fiat, + ), ), ), Tooltip( - message: tradingEnabled - ? '' - : LocaleKeys.tradingDisabledTooltip.tr(), + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : (tradingEnabled + ? '' + : LocaleKeys.tradingDisabledTooltip.tr()), child: DesktopMenuDesktopItem( key: const Key('main-menu-dex'), enabled: currentWallet?.isHW != true, @@ -107,9 +113,11 @@ class _MainMenuDesktopState extends State { ), ), Tooltip( - message: tradingEnabled - ? '' - : LocaleKeys.tradingDisabledTooltip.tr(), + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : (tradingEnabled + ? '' + : LocaleKeys.tradingDisabledTooltip.tr()), child: DesktopMenuDesktopItem( key: const Key('main-menu-bridge'), enabled: currentWallet?.isHW != true, @@ -122,9 +130,12 @@ class _MainMenuDesktopState extends State { ), if (isMMBotEnabled && isAuthenticated) Tooltip( - message: tradingEnabled - ? '' - : LocaleKeys.tradingDisabledTooltip.tr(), + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : (tradingEnabled + ? '' + : LocaleKeys.tradingDisabledTooltip + .tr()), child: DesktopMenuDesktopItem( key: const Key('main-menu-market-maker-bot'), enabled: currentWallet?.isHW != true, @@ -136,7 +147,9 @@ class _MainMenuDesktopState extends State { ), ), Tooltip( - message: LocaleKeys.nftDisabledTooltip.tr(), + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : LocaleKeys.nftDisabledTooltip.tr(), child: DesktopMenuDesktopItem( key: const Key('main-menu-nft'), enabled: false,