File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/hooks/health-computer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ import { SWAP_FEE_BUFFER } from 'utils/constants'
24
24
import { findPositionInAccount } from 'utils/healthComputer'
25
25
import {
26
26
BorrowTarget ,
27
+ LiquidationPriceKind ,
28
+ SwapKind ,
27
29
compute_health_js ,
28
30
liquidation_price_js ,
29
- LiquidationPriceKind ,
30
31
max_borrow_estimate_js ,
31
32
max_perp_size_estimate_js ,
32
33
max_swap_estimate_js ,
33
34
max_withdraw_estimate_js ,
34
- SwapKind ,
35
35
} from 'utils/health_computer'
36
36
import { BN } from 'utils/helpers'
37
37
import { getTokenPrice } from 'utils/tokens'
@@ -199,7 +199,7 @@ export default function useHealthComputer(account?: Account) {
199
199
useEffect ( ( ) => {
200
200
if ( ! healthComputer ) return
201
201
try {
202
- setHealthFactor ( Number ( compute_health_js ( healthComputer ) . max_ltv_health_factor ) || 10 )
202
+ setHealthFactor ( Number ( compute_health_js ( healthComputer ) . liquidation_health_factor ) || 10 )
203
203
} catch ( err ) {
204
204
console . error ( 'Failed to calculate health: ' , err )
205
205
}
You can’t perform that action at this time.
0 commit comments