Skip to content

Commit

Permalink
fix: remove bsc usdt warning (#8072)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefBingbong authored Oct 9, 2023
1 parent 24d68b2 commit 1c502bb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useTranslation } from '@pancakeswap/localization'
import { Flex, FlexGap, Row, Text } from '@pancakeswap/uikit'
import { Dispatch, SetStateAction, useState } from 'react'
import { CryptoFormView, ProviderQuote } from 'views/BuyCrypto/types'
import { ONRAMP_PROVIDERS } from 'views/BuyCrypto/constants'
import AccordionItem from './AccordionItem'

function Accordion({
Expand Down Expand Up @@ -32,20 +31,18 @@ function Accordion({
}
return (
<FlexGap flexDirection="column" gap="16px">
{combinedQuotes
.filter((quote: ProviderQuote) => quote.provider !== ONRAMP_PROVIDERS.MoonPay)
.map((quote: ProviderQuote, idx) => {
return (
<AccordionItem
key={quote.provider}
active={currentIdx === idx}
btnOnClick={() => setCurrentIdx((a) => (a === idx ? '' : idx))}
quote={quote}
fetching={fetching}
setModalView={setModalView}
/>
)
})}
{combinedQuotes.map((quote: ProviderQuote, idx) => {
return (
<AccordionItem
key={quote.provider}
active={currentIdx === idx}
btnOnClick={() => setCurrentIdx((a) => (a === idx ? '' : idx))}
quote={quote}
fetching={fetching}
setModalView={setModalView}
/>
)
})}
</FlexGap>
)
}
Expand Down
4 changes: 0 additions & 4 deletions apps/web/src/views/BuyCrypto/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ export const getChainCurrencyWarningMessages = (
) => {
const networkDisplay = getNetworkDisplay(chainId)
return {
[ChainId.BSC]: t(
'USDT quotes are currently unavailable in USD on BNB Smart Chain. Please select another currency to receive USDT quotes',
{ chainId: networkDisplay },
),
[ChainId.ARBITRUM_ONE]: t(
'UEDC.e quotes are currently unavailable in USD on Arbitrum. Please select another currency to receive USDC.e quotes',
{ chainId: networkDisplay },
Expand Down
15 changes: 6 additions & 9 deletions apps/web/src/views/BuyCrypto/containers/BuyCryptoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,12 @@ export function BuyCryptoForm({
value=""
/>
</Box>
{[ChainId.BASE, ChainId.LINEA, ChainId.BSC, ChainId.ARBITRUM_ONE].includes(chainId) ? (
(chainId === ChainId.BSC && inputCurrencyId === 'USDT' && outputCurrencyId === 'USD') ||
(chainId === ChainId.ARBITRUM_ONE && inputCurrencyId === 'USDC.e' && outputCurrencyId === 'USD') ? (
<Message variant="warning" padding="16px">
<Text fontSize="15px" color="#D67E0B">
{getChainCurrencyWarningMessages(t, chainId)[chainId]}
</Text>
</Message>
) : null
{[ChainId.BASE, ChainId.LINEA, ChainId.ARBITRUM_ONE].includes(chainId) ? (
<Message variant="warning" padding="16px">
<Text fontSize="15px" color="#D67E0B">
{getChainCurrencyWarningMessages(t, chainId)[chainId]}
</Text>
</Message>
) : null}
<Text color="textSubtle" fontSize="14px" px="4px">
{t('Proceed to get live aggregated quotes from a variety of different fiat onramp providers.')}
Expand Down
1 change: 0 additions & 1 deletion packages/localization/src/config/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2706,7 +2706,6 @@
"zkSync Era": "zkSync Era",
"Our affiliate program’s terms and conditions have been updated as of May 3rd, 2023, with changes relating to": "Our affiliate program’s terms and conditions have been updated as of May 3rd, 2023, with changes relating to",
"When staking on zkSync Era, unstaking your CAKE shortly after staking could result in no rewards being earned.": "When staking on zkSync Era, unstaking your CAKE shortly after staking could result in no rewards being earned.",
"USDT quotes are currently unavailable in USD on BNB Smart Chain. Please select another currency to receive USDT quotes": "USDT quotes are currently unavailable in USD on BNB Smart Chain. Please select another currency to receive USDT quotes",
"UEDC.e quotes are currently unavailable in USD on Arbitrum. Please select another currency to receive USDC.e quotes": "UEDC.e quotes are currently unavailable in USD on Arbitrum. Please select another currency to receive USDC.e quotes",
"%chainId% supports limited fiat currencies. USD are not supported": "%chainId% supports limited fiat currencies. USD are not supported",
"Proceed in your wallet": "Proceed in your wallet",
Expand Down

1 comment on commit 1c502bb

@vercel
Copy link

@vercel vercel bot commented on 1c502bb Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

uikit – ./packages/uikit

uikit.pancake.run
uikit-git-develop.pancake.run

Please sign in to comment.