From a20c52df7a77872fd2ed0a41bb98b1abe89c7f58 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Wed, 31 Jan 2024 15:37:11 +0100 Subject: [PATCH] fix: fixed the useSWR key for vaults --- src/hooks/useVaults.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useVaults.tsx b/src/hooks/useVaults.tsx index 31ed110b..61c07b45 100644 --- a/src/hooks/useVaults.tsx +++ b/src/hooks/useVaults.tsx @@ -7,7 +7,7 @@ export default function useVaults(suspense: boolean = true, address?: string) { const chainConfig = useChainConfig() return useSWR( - address && `chains/${chainConfig.id}/vaults/${address}`, + address ? `chains/${chainConfig.id}/vaults/${address}` : `chains/${chainConfig.id}/vaults`, () => getVaults(chainConfig), { suspense,