Skip to content

Commit

Permalink
chore: disable dao member queries on wrong network
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Aug 3, 2023
1 parent 7aea03f commit e14d58a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/hooks/dao/useDAOMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ export const useDAOMember = (
},
{
staleTime: Infinity,
enabled: !!((enabled ?? true) && networkId && groupAddress && userId),
enabled: !!(
(enabled ?? true) &&
network?.kind === NetworkKind.Cosmos &&
networkId &&
groupAddress &&
userId
),
}
);
const { data: gnoData } = useQuery(
Expand All @@ -55,7 +61,12 @@ export const useDAOMember = (
},
{
staleTime: Infinity,
enabled: !!((enabled ?? true) && daoId && userId),
enabled: !!(
(enabled ?? true) &&
network?.kind === NetworkKind.Gno &&
daoId &&
userId
),
}
);
return {
Expand Down

0 comments on commit e14d58a

Please sign in to comment.