Skip to content

Commit

Permalink
fix(coinmarket): hide swap in BTC-only firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
adderpositive authored and tomasklim committed Oct 9, 2024
1 parent 794445f commit 39b97c8
Showing 1 changed file with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -158,20 +159,22 @@ export const HeaderActions = () => {
<Translation id="TR_COINMARKET_BUY_AND_SELL" />
</ButtonComponent>
</ShowOnLargeDesktopWrapper>
<ButtonComponent
icon="arrowsLeftRight"
onClick={() => {
goToWithAnalytics('wallet-coinmarket-exchange', {
preserveParams: true,
});
}}
data-testid="@wallet/menu/wallet-coinmarket-exchange"
variant="tertiary"
size="small"
isDisabled={isAccountLoading}
>
<Translation id="TR_COINMARKET_SWAP" />
</ButtonComponent>
{!hasBitcoinOnlyFirmware(device) && (
<ButtonComponent
icon="arrowsLeftRight"
onClick={() => {
goToWithAnalytics('wallet-coinmarket-exchange', {
preserveParams: true,
});
}}
data-testid="@wallet/menu/wallet-coinmarket-exchange"
variant="tertiary"
size="small"
isDisabled={isAccountLoading}
>
<Translation id="TR_COINMARKET_SWAP" />
</ButtonComponent>
)}
</AppNavigationTooltip>
)}

Expand Down

0 comments on commit 39b97c8

Please sign in to comment.