Skip to content

Commit

Permalink
feat: don't show swapper claim button without wallet connected (#8165)
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre authored Nov 22, 2024
1 parent bc98c28 commit f5b155b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -21,6 +23,7 @@ export const SharedTradeInputHeader = ({

const enableBridgeClaims = useFeatureFlag('ArbitrumBridgeClaims')
const enableLimitOrders = useFeatureFlag('LimitOrders')
const walletId = useAppSelector(selectWalletId)

const handleChangeTab = useCallback(
(newTab: TradeInputTab) => {
Expand Down Expand Up @@ -66,7 +69,7 @@ export const SharedTradeInputHeader = ({
{translate('limitOrder.heading')}
</Heading>
)}
{enableBridgeClaims && (
{enableBridgeClaims && walletId && (
<Heading
as='h5'
fontSize='md'
Expand Down

0 comments on commit f5b155b

Please sign in to comment.