From 39b97c8bc2229d84f7ab2b55110e0e0c878cd27b Mon Sep 17 00:00:00 2001 From: Martin Homola Date: Mon, 7 Oct 2024 14:21:41 +0200 Subject: [PATCH] fix(coinmarket): hide swap in BTC-only firmware --- .../SuiteLayout/PageHeader/HeaderActions.tsx | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx index 68c78e2d85c..52bf76a07a8 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx @@ -19,6 +19,7 @@ import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; import { AppNavigationTooltip } from 'src/components/suite/AppNavigation/AppNavigationTooltip'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; +import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; const Container = styled.div` display: flex; @@ -158,20 +159,22 @@ export const HeaderActions = () => { - { - goToWithAnalytics('wallet-coinmarket-exchange', { - preserveParams: true, - }); - }} - data-testid="@wallet/menu/wallet-coinmarket-exchange" - variant="tertiary" - size="small" - isDisabled={isAccountLoading} - > - - + {!hasBitcoinOnlyFirmware(device) && ( + { + goToWithAnalytics('wallet-coinmarket-exchange', { + preserveParams: true, + }); + }} + data-testid="@wallet/menu/wallet-coinmarket-exchange" + variant="tertiary" + size="small" + isDisabled={isAccountLoading} + > + + + )} )}