From f5b155b059f221f9082ff8b3782ecfb7605cb25d Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:10:51 +0700 Subject: [PATCH] feat: don't show swapper claim button without wallet connected (#8165) --- .../components/SharedTradeInput/SharedTradeInputHeader.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeInputHeader.tsx b/src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeInputHeader.tsx index 3e5a6ef28f8..d259dcf6595 100644 --- a/src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeInputHeader.tsx +++ b/src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeInputHeader.tsx @@ -2,6 +2,8 @@ import { CardHeader, Flex, Heading } from '@chakra-ui/react' import { useCallback, useState } from 'react' import { useTranslate } from 'react-polyglot' import { useFeatureFlag } from 'hooks/useFeatureFlag/useFeatureFlag' +import { selectWalletId } from 'state/slices/selectors' +import { useAppSelector } from 'state/store' import { TradeInputTab } from '../../types' @@ -21,6 +23,7 @@ export const SharedTradeInputHeader = ({ const enableBridgeClaims = useFeatureFlag('ArbitrumBridgeClaims') const enableLimitOrders = useFeatureFlag('LimitOrders') + const walletId = useAppSelector(selectWalletId) const handleChangeTab = useCallback( (newTab: TradeInputTab) => { @@ -66,7 +69,7 @@ export const SharedTradeInputHeader = ({ {translate('limitOrder.heading')} )} - {enableBridgeClaims && ( + {enableBridgeClaims && walletId && (