🐛lend utilization rate (#452)
This commit is contained in:
parent
4538bdabfd
commit
7547f9e148
@ -36,6 +36,7 @@ export default function MarketDetails({ data, type }: Props) {
|
|||||||
const isDollar = displayCurrencySymbol === '$'
|
const isDollar = displayCurrencySymbol === '$'
|
||||||
|
|
||||||
function getLendingMarketDetails() {
|
function getLendingMarketDetails() {
|
||||||
|
const depositCap = (data as LendingMarketTableData).marketDepositCap
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
amount: convertAmount(asset, marketDepositAmount).toNumber(),
|
amount: convertAmount(asset, marketDepositAmount).toNumber(),
|
||||||
@ -67,7 +68,7 @@ export default function MarketDetails({ data, type }: Props) {
|
|||||||
title: 'Oracle Price',
|
title: 'Oracle Price',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(),
|
amount: totalBorrowed.dividedBy(depositCap).multipliedBy(100).toNumber(),
|
||||||
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
options: { minDecimals: 2, maxDecimals: 2, suffix: '%' },
|
||||||
title: 'Utilization Rate',
|
title: 'Utilization Rate',
|
||||||
},
|
},
|
||||||
|
@ -187,4 +187,4 @@ export default function useHealthComputer(account?: Account) {
|
|||||||
computeMaxWithdrawAmount,
|
computeMaxWithdrawAmount,
|
||||||
computeMaxSwapAmount,
|
computeMaxSwapAmount,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,4 +180,4 @@ function getSwapAction(denomIn: string, denomOut: string, amount: BigNumber, sli
|
|||||||
slippage: slippage.toString(),
|
slippage: slippage.toString(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user