fix: if HF > 1 and health === 0, return health 1 (#601)

This commit is contained in:
Linkie Link 2023-10-30 16:30:13 +01:00 committed by GitHub
parent 65ee49a3cd
commit 05dc993604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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])