fix: fixed the useSWR key for vaults

This commit is contained in:
Linkie Link 2024-01-31 15:37:11 +01:00
parent a6122534b7
commit a20c52df7a
No known key found for this signature in database
GPG Key ID: 5318B0F2564D38EA

View File

@ -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,