@safe-global/safe-react-hooks
Version:
A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts
16 lines • 681 B
JavaScript
import { usePublicClientQuery } from '../../hooks/usePublicClientQuery.js';
import { QueryKey } from '../../constants.js';
/**
* Hook to get the connected Safe's deployment state.
* @param params Parameters to customize the hook behavior.
* @param params.config SafeConfig to use instead of the one provided by `SafeProvider`.
* @returns Query result object containing a flag whether the connected Safe is deployed.
*/
export function useIsDeployed(params = {}) {
return usePublicClientQuery({
...params,
querySafeClientFn: (safeClient) => safeClient.isDeployed(),
queryKey: [QueryKey.IsDeployed]
});
}
//# sourceMappingURL=useIsDeployed.js.map