diff --git a/components/swap/JupiterRouteInfo.tsx b/components/swap/JupiterRouteInfo.tsx index a63484ec..e862a010 100644 --- a/components/swap/JupiterRouteInfo.tsx +++ b/components/swap/JupiterRouteInfo.tsx @@ -20,6 +20,7 @@ import { PencilIcon, ArrowsRightLeftIcon, CheckCircleIcon, + ArrowRightIcon, } from '@heroicons/react/20/solid' import { useTranslation } from 'next-i18next' import Image from 'next/image' @@ -243,36 +244,46 @@ const JupiterRouteInfo = ({ /> -
- {`${formatFixedDecimals(
+
+ {`${formatFixedDecimals(
amountIn.toNumber()
)}`}{' '}
- {`${inputTokenInfo!.symbol} for`}{' '}
- {`${formatFixedDecimals(
+ {inputTokenInfo!.symbol}
+ {t('swap:rate')}
+
{swapRate ? (
<>
- 1 {inputTokenInfo!.name} ≈{' '}
+ 1{' '}
+
+ {inputTokenInfo!.name} ≈{' '}
+
{formatFixedDecimals(amountOut.div(amountIn).toNumber())}{' '}
- {outputTokenInfo?.symbol}
+
+ {outputTokenInfo?.symbol}
+
>
) : (
<>
- 1 {outputTokenInfo?.symbol} ≈{' '}
+ 1{' '}
+
+ {outputTokenInfo?.symbol} ≈{' '}
+
{formatFixedDecimals(amountIn.div(amountOut).toNumber())}{' '}
- {inputTokenInfo!.name}
+
+ {inputTokenInfo!.symbol}
+
>
)}
+
{formatDecimal(
JSBI.toNumber(selectedRoute?.otherAmountThreshold) /
10 ** outputTokenInfo.decimals || 1,
outputTokenInfo.decimals
)}{' '}
- {outputTokenInfo?.symbol}
+
+ {outputTokenInfo?.symbol}
+
{t('borrow-amount')}
- ~ {formatFixedDecimals(borrowAmount)} {inputTokenInfo?.symbol}
+
+ ~ {formatFixedDecimals(borrowAmount)}{' '}
+
+ {inputTokenInfo?.symbol}
+
Borrow Fee
+
~{' '}
{formatFixedDecimals(
amountIn
.mul(inputBank!.loanOriginationFeeRate.toFixed())
.toNumber()
)}{' '}
- {inputBank!.name}
+
+ {inputBank!.name}
+
Est. {t('swap:slippage')}
+
{selectedRoute?.priceImpactPct * 100 < 0.1
? '< 0.1%'
: `${(selectedRoute?.priceImpactPct * 100).toFixed(2)}%`}
@@ -377,7 +395,7 @@ const JupiterRouteInfo = ({
{t('fee')}
+
≈ ${feeValue?.toFixed(2)}
+
{(
JSBI.toNumber(info.lpFee?.amount) /
Math.pow(10, feeToken.decimals)
).toFixed(6)}{' '}
- {feeToken?.symbol} ({info.lpFee?.pct * 100}%)
+
+ {feeToken?.symbol}
+ {' '}
+ ({info.lpFee?.pct * 100}%)
{t('swap')}
+ {t('swap')}