Skip to content

Commit

Permalink
Merge pull request #967 from mars-protocol/develop
Browse files Browse the repository at this point in the history
Health Factor adjustments
  • Loading branch information
linkielink authored Jun 10, 2024
2 parents 78c9d52 + 7ca65fb commit cb718b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/health-computer/useHealthComputer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import { SWAP_FEE_BUFFER } from 'utils/constants'
import { findPositionInAccount } from 'utils/healthComputer'
import {
BorrowTarget,
LiquidationPriceKind,
SwapKind,
compute_health_js,
liquidation_price_js,
LiquidationPriceKind,
max_borrow_estimate_js,
max_perp_size_estimate_js,
max_swap_estimate_js,
max_withdraw_estimate_js,
SwapKind,
} from 'utils/health_computer'
import { BN } from 'utils/helpers'
import { getTokenPrice } from 'utils/tokens'
Expand Down Expand Up @@ -199,7 +199,7 @@ export default function useHealthComputer(account?: Account) {
useEffect(() => {
if (!healthComputer) return
try {
setHealthFactor(Number(compute_health_js(healthComputer).max_ltv_health_factor) || 10)
setHealthFactor(Number(compute_health_js(healthComputer).liquidation_health_factor) || 10)
} catch (err) {
console.error('Failed to calculate health: ', err)
}
Expand Down

0 comments on commit cb718b3

Please sign in to comment.