fix: market liquidity default to 0 (#34)
This commit is contained in:
parent
d22de166da
commit
d3a1e9f3f1
@ -65,7 +65,7 @@ const useCalculateMaxBorrowAmount = (denom: string, isUnderCollateralized: boole
|
||||
.toNumber()
|
||||
}
|
||||
|
||||
const marketLiquidity = BigNumber(redbankBalances?.[denom] ?? '')
|
||||
const marketLiquidity = BigNumber(redbankBalances?.[denom] ?? 0)
|
||||
.div(10 ** getTokenDecimals(denom))
|
||||
.toNumber()
|
||||
|
||||
|
@ -56,7 +56,7 @@ const Borrow = () => {
|
||||
.map((denom) => {
|
||||
const { symbol, chain, icon } = getTokenInfo(denom)
|
||||
const borrowRate = Number(marketsData?.[denom].borrow_rate) || 0
|
||||
const marketLiquidity = BigNumber(redbankBalances?.[denom] ?? '')
|
||||
const marketLiquidity = BigNumber(redbankBalances?.[denom] ?? 0)
|
||||
.div(10 ** getTokenDecimals(denom))
|
||||
.toNumber()
|
||||
|
||||
@ -86,7 +86,7 @@ const Borrow = () => {
|
||||
.map((denom) => {
|
||||
const { symbol, chain, icon } = getTokenInfo(denom)
|
||||
const borrowRate = Number(marketsData?.[denom].borrow_rate) || 0
|
||||
const marketLiquidity = BigNumber(redbankBalances?.[denom] ?? '')
|
||||
const marketLiquidity = BigNumber(redbankBalances?.[denom] ?? 0)
|
||||
.div(10 ** getTokenDecimals(denom))
|
||||
.toNumber()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user