Skip to content
Snippets Groups Projects

implementing vesting delegations card - issue 284

Merged mcfarhat requested to merge mcfarhat-284-add_vesting_delegations into develop
5 files
+ 134
0
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 18
0
import { useQuery } from "@tanstack/react-query";
import fetchingService from "@/services/FetchingService";
const useVestingDelegations = (delegatorAccount: string, startAccount: string | null, limit: number) => {
const {
data: vestingDelegationsData,
isLoading: isVestingDelegationsLoading,
isError: isVestingDelegationsError,
} = useQuery({
queryKey: ["vestingDelegations", delegatorAccount, startAccount, limit],
queryFn: () => fetchingService.getVestingDelegations(delegatorAccount, startAccount, limit),
refetchOnWindowFocus: false,
});
return { vestingDelegationsData, isVestingDelegationsLoading, isVestingDelegationsError };
};
export default useVestingDelegations;
Loading