Commit 1c8b3f03 authored by Jack Short's avatar Jack Short Committed by GitHub

fix: currency select modal when chain is not supported (#6759)

* fix: currency select modal when chain is not supported

* removing pay with if on unsupported network

* refactor
parent fc836590
...@@ -13,7 +13,7 @@ import Row from 'components/Row' ...@@ -13,7 +13,7 @@ import Row from 'components/Row'
import CurrencySearchModal from 'components/SearchModal/CurrencySearchModal' import CurrencySearchModal from 'components/SearchModal/CurrencySearchModal'
import { LoadingBubble } from 'components/Tokens/loading' import { LoadingBubble } from 'components/Tokens/loading'
import { MouseoverTooltip } from 'components/Tooltip' import { MouseoverTooltip } from 'components/Tooltip'
import { SupportedChainId } from 'constants/chains' import { isSupportedChain, SupportedChainId } from 'constants/chains'
import { useNftUniversalRouterAddress } from 'graphql/data/nft/NftUniversalRouterAddress' import { useNftUniversalRouterAddress } from 'graphql/data/nft/NftUniversalRouterAddress'
import { useCurrency } from 'hooks/Tokens' import { useCurrency } from 'hooks/Tokens'
import { AllowanceState } from 'hooks/usePermit2Allowance' import { AllowanceState } from 'hooks/usePermit2Allowance'
...@@ -461,6 +461,8 @@ export const BagFooter = ({ setModalIsOpen, eventProperties }: BagFooterProps) = ...@@ -461,6 +461,8 @@ export const BagFooter = ({ setModalIsOpen, eventProperties }: BagFooterProps) =
<FooterHeader gap="xs"> <FooterHeader gap="xs">
<CurrencyRow> <CurrencyRow>
<Column gap="xs"> <Column gap="xs">
{isSupportedChain(chainId) && (
<>
<ThemedText.SubHeaderSmall> <ThemedText.SubHeaderSmall>
<Trans>Pay with</Trans> <Trans>Pay with</Trans>
</ThemedText.SubHeaderSmall> </ThemedText.SubHeaderSmall>
...@@ -478,6 +480,8 @@ export const BagFooter = ({ setModalIsOpen, eventProperties }: BagFooterProps) = ...@@ -478,6 +480,8 @@ export const BagFooter = ({ setModalIsOpen, eventProperties }: BagFooterProps) =
</ThemedText.HeadlineSmall> </ThemedText.HeadlineSmall>
<ChevronDown size={20} color={theme.textSecondary} /> <ChevronDown size={20} color={theme.textSecondary} />
</CurrencyInput> </CurrencyInput>
</>
)}
</Column> </Column>
<TotalColumn gap="xs"> <TotalColumn gap="xs">
<ThemedText.SubHeaderSmall marginBottom="4px"> <ThemedText.SubHeaderSmall marginBottom="4px">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment