UNPKG

@safe-global/safe-react-hooks

Version:

A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts

18 lines 605 B
import { QueryClient } from '@tanstack/react-query'; import { QueryKey } from './constants.js'; export const queryClient = new QueryClient(); export const invalidateQueries = (queryKeys) => { queryKeys.forEach((key) => { queryClient.invalidateQueries({ queryKey: [key] }); if (key === QueryKey.SafeInfo) { invalidateQueries([ QueryKey.Address, QueryKey.Nonce, QueryKey.Threshold, QueryKey.IsDeployed, QueryKey.Owners ]); } }); }; //# sourceMappingURL=queryClient.js.map