From fb10397e6f9edae80154be13d11a4d9bb617e108 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Mon, 30 Oct 2023 21:27:09 +0100 Subject: [PATCH] v2.0.2 hotfix (#604) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: if HF > 1 and Health === 0 -> return health = 1 * fix: don’t return undefined --- src/hooks/useHealthComputer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/useHealthComputer.tsx b/src/hooks/useHealthComputer.tsx index dd9719d2..1ccbf708 100644 --- a/src/hooks/useHealthComputer.tsx +++ b/src/hooks/useHealthComputer.tsx @@ -189,6 +189,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])