From 42bfdd44daab89808bad6de74cf4dd8077c2394b Mon Sep 17 00:00:00 2001 From: MikaelVallenet Date: Fri, 18 Oct 2024 10:02:20 +0200 Subject: [PATCH] fix: add network id as dependency of useQueries --- packages/screens/LaunchpadERC20/hooks/useLastAirdrops.ts | 2 +- packages/screens/LaunchpadERC20/hooks/useLastSales.ts | 2 +- packages/screens/LaunchpadERC20/hooks/useLastTokens.ts | 2 +- packages/screens/LaunchpadERC20/hooks/useUserTokens.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/screens/LaunchpadERC20/hooks/useLastAirdrops.ts b/packages/screens/LaunchpadERC20/hooks/useLastAirdrops.ts index 9438cf8ac0..e90a5369cb 100644 --- a/packages/screens/LaunchpadERC20/hooks/useLastAirdrops.ts +++ b/packages/screens/LaunchpadERC20/hooks/useLastAirdrops.ts @@ -12,7 +12,7 @@ import { extractGnoJSONString } from "@/utils/gno"; import { zodAidrop } from "@/utils/types/types"; export const useLastAirdrops = (networkId: string) => { - return useQuery(["lastAirdrops"], async () => { + return useQuery(["lastAirdrops", networkId], async () => { const gnoNetwork = getGnoNetwork(networkId); if (!gnoNetwork) { return null; diff --git a/packages/screens/LaunchpadERC20/hooks/useLastSales.ts b/packages/screens/LaunchpadERC20/hooks/useLastSales.ts index 01bd35a981..5ae3f74798 100644 --- a/packages/screens/LaunchpadERC20/hooks/useLastSales.ts +++ b/packages/screens/LaunchpadERC20/hooks/useLastSales.ts @@ -12,7 +12,7 @@ import { extractGnoJSONString } from "@/utils/gno"; import { zodSale } from "@/utils/types/types"; export const useLastSales = (networkId: string) => { - return useQuery(["lastSales"], async () => { + return useQuery(["lastSales", networkId], async () => { const gnoNetwork = getGnoNetwork(networkId); if (!gnoNetwork) { return null; diff --git a/packages/screens/LaunchpadERC20/hooks/useLastTokens.ts b/packages/screens/LaunchpadERC20/hooks/useLastTokens.ts index fb34ae2a76..4ac1d34985 100644 --- a/packages/screens/LaunchpadERC20/hooks/useLastTokens.ts +++ b/packages/screens/LaunchpadERC20/hooks/useLastTokens.ts @@ -12,7 +12,7 @@ import { extractGnoJSONString } from "@/utils/gno"; import { zodToken } from "@/utils/types/types"; export const useLastTokens = (networkId: string) => { - return useQuery(["lastTokens"], async () => { + return useQuery(["lastTokens", networkId], async () => { const gnoNetwork = getGnoNetwork(networkId); if (!gnoNetwork) { return null; diff --git a/packages/screens/LaunchpadERC20/hooks/useUserTokens.ts b/packages/screens/LaunchpadERC20/hooks/useUserTokens.ts index 55a4a5a1a1..7a22248cc8 100644 --- a/packages/screens/LaunchpadERC20/hooks/useUserTokens.ts +++ b/packages/screens/LaunchpadERC20/hooks/useUserTokens.ts @@ -7,7 +7,7 @@ import { extractGnoJSONString } from "@/utils/gno"; import { zodToken } from "@/utils/types/types"; export const useUserTokens = (networkId: string, addr: string) => { - return useQuery(["userTokens", addr], async () => { + return useQuery(["userTokens", addr, networkId], async () => { const gnoNetwork = getGnoNetwork(networkId); if (!gnoNetwork) { return null;