diff --git a/src/components/pages/Profile/Header/Stats.tsx b/src/components/pages/Profile/Header/Stats.tsx index 8f4604a63..92aa9961c 100644 --- a/src/components/pages/Profile/Header/Stats.tsx +++ b/src/components/pages/Profile/Header/Stats.tsx @@ -88,7 +88,7 @@ export default function Stats({ } } getAccountTVL() - }, [publishedAssets]) + }, [publishedAssets, accountId, chainIds]) return (
diff --git a/src/components/pages/Profile/History/PoolShares.tsx b/src/components/pages/Profile/History/PoolShares.tsx index 5963d22cf..48d6e2945 100644 --- a/src/components/pages/Profile/History/PoolShares.tsx +++ b/src/components/pages/Profile/History/PoolShares.tsx @@ -210,7 +210,6 @@ export default function PoolShares({ const fetchPoolSharesData = useCallback(async () => { try { - setLoading(true) const data = await getPoolSharesData(accountId, chainIds) const newAssets = await getPoolSharesAssets(data) @@ -219,14 +218,14 @@ export default function PoolShares({ } } catch (error) { console.error('Error fetching pool shares: ', error.message) - } finally { - setLoading(false) } }, [accountId, assets, chainIds]) useEffect(() => { async function init() { + setLoading(true) await fetchPoolSharesData() + setLoading(false) if (dataFetchInterval) return const interval = setInterval(async () => {