diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx index 4020a41a9..0004a852e 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx @@ -1,10 +1,10 @@ -import { useCallback, useMemo } from "react" -import { ethers } from "ethers" -import classNames from "classnames" -import { Network } from "@dcl/schemas" -import { ChainId, getNetwork } from "@dcl/schemas/dist/dapps/chain-id" -import { t } from "decentraland-dapps/dist/modules/translation" -import { Wallet } from "decentraland-dapps/dist/modules/wallet/types" +import { useCallback, useMemo } from 'react' +import { ethers } from 'ethers' +import classNames from 'classnames' +import { Network } from '@dcl/schemas' +import { ChainId, getNetwork } from '@dcl/schemas/dist/dapps/chain-id' +import { t } from 'decentraland-dapps/dist/modules/translation' +import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import type { ChainData, Route, Token } from "decentraland-transactions/crossChain" import { Icon, InfoTooltip } from "decentraland-ui" import { ManaToFiat } from "../../../ManaToFiat" @@ -36,7 +36,24 @@ type Props = { } const PaymentSelector = (props: Props) => { - const { price, shouldUseCrossChainProvider, route, gasCost, isFetchingGasCost, routeFeeCost, selectedToken, selectedChain, amountInSelectedToken, selectedProviderChain, providerTokens, wallet, selectedTokenBalance, isFetchingBalance, onShowChainSelector, onShowTokenSelector } = props + const { + price, + shouldUseCrossChainProvider, + route, + gasCost, + isFetchingGasCost, + routeFeeCost, + selectedToken, + selectedChain, + amountInSelectedToken, + selectedProviderChain, + providerTokens, + wallet, + selectedTokenBalance, + isFetchingBalance, + onShowChainSelector, + onShowTokenSelector + } = props const canSelectChainAndToken = useMemo(() => { return BigInt(price) > BigInt(0) @@ -149,7 +166,8 @@ const PaymentSelector = (props: Props) => { <> $ {( - Number(amountInSelectedToken) * selectedToken.usdPrice + Number(amountInSelectedToken) * + selectedToken.usdPrice ).toFixed(4)} ) : ( @@ -165,7 +183,8 @@ const PaymentSelector = (props: Props) => {
{t('buy_with_crypto_modal.fee_cost')} - { )} style={{ zIndex: 3001 }} position="top center" - /> + />
{gasCost && gasCost.token ? ( @@ -235,4 +254,4 @@ const PaymentSelector = (props: Props) => { ) } -export default PaymentSelector \ No newline at end of file +export default PaymentSelector