fix: if HF > 1 and health === 0, return health 1 (#601)
This commit is contained in:
parent
65ee49a3cd
commit
05dc993604
@ -190,6 +190,7 @@ export default function useHealthComputer(account?: Account) {
|
||||
.toNumber()
|
||||
|
||||
if (convertedHealth > 100) return 100
|
||||
if (convertedHealth === 0 && healthFactor > 1) return 1
|
||||
if (convertedHealth < 0) return 0
|
||||
return convertedHealth
|
||||
}, [healthFactor])
|
||||
|
Loading…
Reference in New Issue
Block a user