v2.0.2 hotfix (#604)
* fix: if HF > 1 and Health === 0 -> return health = 1 * fix: don’t return undefined
This commit is contained in:
parent
c0893b8061
commit
fb10397e6f
@ -189,6 +189,7 @@ export default function useHealthComputer(account?: Account) {
|
|||||||
.toNumber()
|
.toNumber()
|
||||||
|
|
||||||
if (convertedHealth > 100) return 100
|
if (convertedHealth > 100) return 100
|
||||||
|
if (convertedHealth === 0 && healthFactor > 1) return 1
|
||||||
if (convertedHealth < 0) return 0
|
if (convertedHealth < 0) return 0
|
||||||
return convertedHealth
|
return convertedHealth
|
||||||
}, [healthFactor])
|
}, [healthFactor])
|
||||||
|
Loading…
Reference in New Issue
Block a user