mars-v2-frontend/src/api/markets/getMarketUnderlyingLiquidityAmount.ts
Bob van der Helm d87fbd2a15
Mp 3270 deposit cap messages (#416)
* Add Deposit cap for AssetSelector

* Add DepositCap component for Trade

* DepositCap to Vault and Fund

* DepositCap to Vault and Fund

* Small bugixes

* formatting fixes

* formatting fixes

* formatting fixes

* formatting fixes

* run format
2023-09-04 09:46:13 +02:00

14 lines
384 B
TypeScript

import { getRedBankQueryClient } from 'api/cosmwasm-client'
export default async function getUnderlyingLiquidityAmount(market: Market): Promise<string> {
try {
const client = await getRedBankQueryClient()
return await client.underlyingLiquidityAmount({
denom: market.denom,
amountScaled: market.collateralTotalScaled,
})
} catch (ex) {
throw ex
}
}