Skip to content

Commit ddc3e4e

Browse files
fix: review comments
1 parent 15f69fc commit ddc3e4e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

apps/main/src/lend/components/PageLoanManage/LoanBorrowMore/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import useStore from '@/lend/store/useStore'
2121
import { Api, OneWayMarketTemplate, PageContentProps } from '@/lend/types/lend.types'
2222
import { _showNoLoanFound } from '@/lend/utils/helpers'
2323
import { DEFAULT_HEALTH_MODE } from '@/llamalend/constants'
24+
import { hasLeverage } from '@/llamalend/llama.utils'
2425
import type { HealthMode } from '@/llamalend/llamalend.types'
2526
import { useLoanExists } from '@/llamalend/queries/loan-exists'
2627
import Stack from '@mui/material/Stack'
@@ -43,7 +44,7 @@ const { Spacing } = SizesAndSpaces
4344

4445
const LoanBorrowMore = ({ rChainId, rOwmId, isLoaded, api, market, userActiveKey }: PageContentProps) => {
4546
const isSubscribed = useRef(false)
46-
const isLeverage = market?.leverage?.hasLeverage() ?? false
47+
const isLeverage = !!market && hasLeverage(market)
4748
const activeKey = useStore((state) => state.loanBorrowMore.activeKey)
4849
const activeKeyMax = useStore((state) => state.loanBorrowMore.activeKeyMax)
4950
const detailInfoLeverage = useStore((state) => state.loanBorrowMore.detailInfoLeverage[activeKey])

apps/main/src/llamalend/features/manage-loan/components/RepayForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const RepayForm = <ChainId extends IChainId>({
2929
networks: NetworkDict<ChainId>
3030
chainId: ChainId
3131
enabled?: boolean
32-
onRepaid?: NonNullable<RepayOptions['onRepaid']>
32+
onRepaid?: RepayOptions['onRepaid']
3333
fromCollateral?: boolean
3434
fromWallet?: boolean
3535
fromBorrowed?: boolean

apps/main/src/llamalend/features/manage-loan/hooks/useRepayForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const useRepayForm = <ChainId extends LlamaChainId, NetworkName extends L
3737
network: { id: LlamaNetworkId; chainId: ChainId }
3838
networks: NetworkDict<ChainId>
3939
enabled?: boolean
40-
onRepaid?: NonNullable<RepayOptions['onRepaid']>
40+
onRepaid?: RepayOptions['onRepaid']
4141
}) => {
4242
const { address: userAddress } = useAccount()
4343
const { chainId } = network

0 commit comments

Comments
 (0)