🐛Corrected used deposit cap for Lend (#463)

This commit is contained in:
Bob van der Helm 2023-09-13 11:20:18 +02:00 committed by GitHub
parent 473e01de63
commit 38ae904959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ import MarketAssetTableRow from 'components/MarketAssetTable/MarketAssetTableRow
import MarketDetails from 'components/MarketAssetTable/MarketDetails'
import TitleAndSubCell from 'components/TitleAndSubCell'
import { BN_ZERO } from 'constants/math'
import { convertLiquidityRateToAPR, demagnify } from 'utils/formatters'
import { convertLiquidityRateToAPR } from 'utils/formatters'
import { BN } from 'utils/helpers'
interface Props {
@ -97,9 +97,7 @@ export default function LendingMarketsTable(props: Props) {
header: 'Depo. Cap',
cell: ({ row }) => {
const { marketDepositCap, marketDepositAmount, asset } = row.original
const remainingCap = row.original.marketDepositCap.minus(
demagnify(marketDepositAmount, asset),
)
const remainingCap = row.original.marketDepositCap.minus(marketDepositAmount)
return (
<TitleAndSubCell
@ -137,4 +135,4 @@ export default function LendingMarketsTable(props: Props) {
)
return <AssetListTable title={title} rowRenderer={rowRenderer} columns={columns} data={data} />
}
}