diff --git a/src/components/CurrencyInputPanel/index.tsx b/src/components/CurrencyInputPanel/index.tsx index 498a4b4c..e07c6591 100644 --- a/src/components/CurrencyInputPanel/index.tsx +++ b/src/components/CurrencyInputPanel/index.tsx @@ -3,7 +3,7 @@ import { Currency, Pair } from '@apeswapfinance/sdk' import { Button, ChevronDownIcon, Text } from '@apeswapfinance/uikit' import styled from 'styled-components' import { darken } from 'polished' -// import EstimatedConvertDollar from 'components/swap/EstimatedConvertDollar' +import EstimatedConvertDollar from 'components/swap/EstimatedConvertDollar' import { useCurrencyBalance } from '../../state/wallet/hooks' import CurrencySearchModal from '../SearchModal/CurrencySearchModal' import CurrencyLogo from '../CurrencyLogo' @@ -183,7 +183,7 @@ export default function CurrencyInputPanel({ - {/* */} + {!disableCurrencySelect && onCurrencySelect && ( { setTotalRate(total); }, [total]) + return trade ? totalRate : null; +} + +export default function EstimatedConvertDollar({ currency, typedValue = null }: { currency: any; typedValue: any }) { + const totalRate = CalculateRate(currency, typedValue); return ( ~ - {trade ? ${totalRate || 0} : '-'} + {totalRate ? ${totalRate || 0} : '-'} ) } +