Skip to content

Commit

Permalink
fix get drep voting power
Browse files Browse the repository at this point in the history
  • Loading branch information
Sworzen1 committed Feb 23, 2024
1 parent 0273f62 commit a8f5193
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { useCardano } from "@context";
import { getDRepVotingPower } from "@services";

export const useGetDRepVotingPowerQuery = () => {
const { dRepID } = useCardano();
const { dRepID, dRep } = useCardano();

const { data, isLoading } = useQuery({
queryKey: QUERY_KEYS.useGetDRepVotingPowerKey,
queryFn: async () => {
return await getDRepVotingPower({ dRepID });
},
enabled: !!dRepID,
enabled: !!dRepID && dRep?.isRegistered,
});

return { dRepVotingPower: data, isDRepVotingPowerLoading: isLoading };
Expand Down

0 comments on commit a8f5193

Please sign in to comment.