diff --git a/src/api/hls/getHLSStakingAccounts.ts b/src/api/hls/getHLSStakingAccounts.ts index 180e049f..3b5ab3eb 100644 --- a/src/api/hls/getHLSStakingAccounts.ts +++ b/src/api/hls/getHLSStakingAccounts.ts @@ -13,12 +13,10 @@ export default async function getHLSStakingAccounts( const hlsAccountsWithStrategy: HLSAccountWithStrategy[] = [] activeAccounts.forEach((account) => { - if (account.deposits.length === 0 || account.debts.length === 0) return + if (account.deposits.length === 0) return const strategy = hlsStrategies.find( - (strategy) => - strategy.denoms.deposit === account.deposits.at(0).denom && - strategy.denoms.borrow === account.debts.at(0).denom, + (strategy) => strategy.denoms.deposit === account.deposits.at(0).denom, ) if (!strategy) return diff --git a/src/components/Account/Health/HealthTooltip.tsx b/src/components/Account/Health/HealthTooltip.tsx index 6682990d..14a84dff 100644 --- a/src/components/Account/Health/HealthTooltip.tsx +++ b/src/components/Account/Health/HealthTooltip.tsx @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react' +import React, { ReactElement, useMemo } from 'react' import { CircularProgress } from 'components/CircularProgress' import Text from 'components/Text' @@ -8,7 +8,7 @@ import { BN } from 'utils/helpers' interface Props { health: number healthFactor: number - children: React.ReactNode + children: ReactElement } function HealthTooltipContent({ health, healthFactor }: { health: number; healthFactor: number }) { diff --git a/src/components/Button/DropDownButton.tsx b/src/components/Button/DropDownButton.tsx index 0ea46a6e..18a7bc21 100644 --- a/src/components/Button/DropDownButton.tsx +++ b/src/components/Button/DropDownButton.tsx @@ -2,6 +2,7 @@ import Button from 'components/Button' import { ChevronDown } from 'components/Icons' import Text from 'components/Text' import { Tooltip } from 'components/Tooltip' +import useToggle from 'hooks/useToggle' interface Props extends ButtonProps { items: DropDownItem[] @@ -9,6 +10,7 @@ interface Props extends ButtonProps { } export default function DropDownButton(props: Props) { + const [isOpen, toggleIsOpen] = useToggle(false) return ( } @@ -17,8 +19,15 @@ export default function DropDownButton(props: Props) { contentClassName='!bg-white/10 border border-white/20 backdrop-blur-xl !p-0' interactive hideArrow + visible={isOpen} + onClickOutside={() => toggleIsOpen(false)} > -