From 66d625d4a24a3041fec5c5120907594b0f79b81d Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 4 Nov 2025 18:20:48 +0800 Subject: [PATCH 1/2] add notes regarding trezor feature compatibility --- assets/translations/en.json | 2 + lib/generated/codegen_loader.g.dart | 2 + .../hw_wallet_dialog/hw_dialog_init.dart | 5 ++ .../main_menu/main_menu_bar_mobile.dart | 49 ++++++++++----- .../common/main_menu/main_menu_desktop.dart | 63 ++++++++++++------- 5 files changed, 82 insertions(+), 39 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 2237c7d7d1..2ac5e8ce6f 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 22a4045ab6..8700750e2b 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 1cb66a7110..6b7eb84a17 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,23 @@ class MainMenuBarMobile extends StatelessWidget { ), ), Expanded( - child: MainMenuBarMobileItem( - value: MainMenuValue.fiat, - enabled: currentWallet?.isHW != true, - isActive: selected == MainMenuValue.fiat, + child: Tooltip( + message: + isHardware ? LocaleKeys.trezorUnavailableTooltip.tr() : '', + child: MainMenuBarMobileItem( + value: MainMenuValue.fiat, + enabled: currentWallet?.isHW != 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 +77,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 +92,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, @@ -94,10 +105,14 @@ class MainMenuBarMobile extends StatelessWidget { ), ), Expanded( - child: MainMenuBarMobileItem( - value: MainMenuValue.nft, - enabled: currentWallet?.isHW != true, - isActive: selected == MainMenuValue.nft, + child: Tooltip( + message: + isHardware ? LocaleKeys.trezorUnavailableTooltip.tr() : '', + child: MainMenuBarMobileItem( + value: MainMenuValue.nft, + enabled: currentWallet?.isHW != true, + isActive: selected == MainMenuValue.nft, + ), ), ), Expanded( diff --git a/lib/views/common/main_menu/main_menu_desktop.dart b/lib/views/common/main_menu/main_menu_desktop.dart index 4ae6450582..24cef3cb68 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,26 @@ 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: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : '', + child: DesktopMenuDesktopItem( + key: const Key('main-menu-fiat'), + enabled: currentWallet?.isHW != 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 +115,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 +132,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, @@ -135,12 +148,18 @@ class _MainMenuDesktopState extends State { ), ), ), - DesktopMenuDesktopItem( - key: const Key('main-menu-nft'), - enabled: currentWallet?.isHW != true, - menu: MainMenuValue.nft, - onTap: onTapItem, - isSelected: _checkSelectedItem(MainMenuValue.nft), + Tooltip( + message: isHardware + ? LocaleKeys.trezorUnavailableTooltip.tr() + : '', + child: DesktopMenuDesktopItem( + key: const Key('main-menu-nft'), + enabled: currentWallet?.isHW != true, + menu: MainMenuValue.nft, + onTap: onTapItem, + isSelected: + _checkSelectedItem(MainMenuValue.nft), + ), ), const Spacer(), Divider(thickness: 1), From 6cb0b5f31bf06314acaf3ae6b6c31990f01e22e2 Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 4 Nov 2025 18:45:30 +0800 Subject: [PATCH 2/2] unblock fiat tab for trezor --- lib/views/common/main_menu/main_menu_bar_mobile.dart | 5 ++--- lib/views/common/main_menu/main_menu_desktop.dart | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) 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 6b7eb84a17..9572816fc8 100644 --- a/lib/views/common/main_menu/main_menu_bar_mobile.dart +++ b/lib/views/common/main_menu/main_menu_bar_mobile.dart @@ -52,11 +52,10 @@ class MainMenuBarMobile extends StatelessWidget { ), Expanded( child: Tooltip( - message: - isHardware ? LocaleKeys.trezorUnavailableTooltip.tr() : '', + message: '', child: MainMenuBarMobileItem( value: MainMenuValue.fiat, - enabled: currentWallet?.isHW != true, + enabled: true, isActive: selected == MainMenuValue.fiat, ), ), diff --git a/lib/views/common/main_menu/main_menu_desktop.dart b/lib/views/common/main_menu/main_menu_desktop.dart index 24cef3cb68..b752b8397b 100644 --- a/lib/views/common/main_menu/main_menu_desktop.dart +++ b/lib/views/common/main_menu/main_menu_desktop.dart @@ -85,12 +85,10 @@ class _MainMenuDesktopState extends State { ), ), Tooltip( - message: isHardware - ? LocaleKeys.trezorUnavailableTooltip.tr() - : '', + message: '', child: DesktopMenuDesktopItem( key: const Key('main-menu-fiat'), - enabled: currentWallet?.isHW != true, + enabled: true, menu: MainMenuValue.fiat, onTap: onTapItem, isSelected: _checkSelectedItem(