diff --git a/apps/bond/components/BondingProducts/Bonding/TokenManagement/WsolDeposit.jsx b/apps/bond/components/BondingProducts/Bonding/TokenManagement/WsolDeposit.jsx index bb044581..b34034d5 100644 --- a/apps/bond/components/BondingProducts/Bonding/TokenManagement/WsolDeposit.jsx +++ b/apps/bond/components/BondingProducts/Bonding/TokenManagement/WsolDeposit.jsx @@ -1,10 +1,11 @@ -import { Alert, Button, Flex, Form, InputNumber, Spin, Typography } from 'antd'; +import { Alert, Button, Form, InputNumber, Table, Typography } from 'antd'; import { isNumber } from 'lodash'; import pDebounce from 'p-debounce'; import { useState } from 'react'; import { getCommaSeparatedNumber, notifyError } from '@autonolas/frontend-library'; +import { NA } from 'libs/util-constants/src'; import { useSvmConnectivity } from 'common-util/hooks/useSvmConnectivity'; import { SVM_AMOUNT_DIVISOR } from './constants'; @@ -19,12 +20,13 @@ export const WsolDeposit = () => { const [estimatedQuote, setEstimatedQuote] = useState(null); const [isEstimating, setIsEstimating] = useState(false); const [isDepositing, setIsDepositing] = useState(false); - const [bridgedTokenAmount, setBridgedTokenAmount] = useState(null); + const [quoteLiquidity, setQuoteLiquidity] = useState(null); const { getDepositIncreaseLiquidityQuote: fn, getDepositTransformedQuote, deposit, + bridgedTokenAmount, } = useWsolDeposit(); const getDepositQuote = pDebounce(fn, 500); @@ -59,10 +61,8 @@ export const WsolDeposit = () => { const sol = form.getFieldValue('sol'); const slippage = form.getFieldValue('slippage'); - const bridgedToken = await deposit({ slippage, sol }); - if (Number(bridgedToken) > 0) { - setBridgedTokenAmount(bridgedToken / SVM_AMOUNT_DIVISOR); - } + const quoteLiquidityAmount = await deposit({ slippage, sol }); + setQuoteLiquidity(quoteLiquidityAmount / SVM_AMOUNT_DIVISOR); } catch (error) { console.error(error); } finally { @@ -72,7 +72,10 @@ export const WsolDeposit = () => { const isDepositButtonDisabled = isEstimating || isDepositing || !isSvmWalletConnected; const estimatedOutput = - getCommaSeparatedNumber((estimatedQuote?.liquidity || 0) / SVM_AMOUNT_DIVISOR) || '--'; + getCommaSeparatedNumber((estimatedQuote?.liquidity || 0) / SVM_AMOUNT_DIVISOR) || NA; + const bridgedTokenAmountValue = bridgedTokenAmount + ? getCommaSeparatedNumber(bridgedTokenAmount) + : NA; return ( <> @@ -118,12 +121,33 @@ export const WsolDeposit = () => { - - - ESTIMATED OUTPUT - {`${estimatedOutput} WSOL-OLAS LP`} - - +