MP-3483: all Depo. Caps are now % filled (#551)
This commit is contained in:
parent
19fb876668
commit
623bbe8854
@ -154,7 +154,6 @@ export const VaultTable = (props: Props) => {
|
||||
const percent = vault.cap.used
|
||||
.dividedBy(vault.cap.max.multipliedBy(VAULT_DEPOSIT_BUFFER))
|
||||
.multipliedBy(100)
|
||||
.integerValue()
|
||||
|
||||
const decimals = getAssetByDenom(vault.cap.denom)?.decimals ?? 6
|
||||
|
||||
|
@ -99,7 +99,9 @@ export default function LendingMarketsTable(props: Props) {
|
||||
header: 'Depo. Cap',
|
||||
cell: ({ row }) => {
|
||||
const { marketDepositCap, marketDepositAmount, asset } = row.original
|
||||
const remainingCap = row.original.marketDepositCap.minus(marketDepositAmount)
|
||||
const percent = marketDepositAmount
|
||||
.dividedBy(row.original.marketDepositCap)
|
||||
.multipliedBy(100)
|
||||
|
||||
return (
|
||||
<TitleAndSubCell
|
||||
@ -113,8 +115,8 @@ export default function LendingMarketsTable(props: Props) {
|
||||
}
|
||||
sub={
|
||||
<FormattedNumber
|
||||
amount={remainingCap.toNumber()}
|
||||
options={{ abbreviated: true, decimals: asset.decimals, suffix: ` left` }}
|
||||
amount={percent.toNumber()}
|
||||
options={{ minDecimals: 2, maxDecimals: 2, suffix: '% Filled' }}
|
||||
animate
|
||||
/>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user