Skip to content

Commit

Permalink
fix health
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhochu committed Jan 3, 2024
1 parent 5ee0fd4 commit fa2e958
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hooks/useUserHealth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function useUserHealth() {
: "Good";

let allHealths: any[] = [];
if (![-1, null].includes(healthFactor)) {
if (![null].includes(healthFactor)) {
allHealths.push({
id: `token${healthFactor}`,
type: "Single Token",
Expand Down
2 changes: 1 addition & 1 deletion screens/Dashboard/dashboardOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DashboardOverview = ({ suppliedRows, borrowedRows }) => {
}, []);

useEffect(() => {
if (userHealth?.allHealths && !userHealthCur?.healthFactor) {
if (userHealth?.allHealths?.length && !userHealthCur?.healthFactor) {
handleHealthClick(userHealth.allHealths[0]);
}
}, [userHealth?.allHealths]);
Expand Down

0 comments on commit fa2e958

Please sign in to comment.