useIsRecoveryActive

Description

This hook allows you to check if the recovery module is activated.

Parameters

type IsRecoveryActiveParams = {
    rpcUrl?: string;
};

Example

import { useIsRecoveryActive } from "@/hooks/useIsRecoveryActive";

export const RecoveryStatus = () => {
  const { data, isLoading, isError, error } = useIsRecoveryActive({
    rpcUrl: 'https://my-rpc-url.com',
  });

  if (isLoading) return <p>Loading recovery status...</p>;
  if (isError) return <p>Error: {error?.message}</p>;

  return (
    <div>
      <p>Recovery Module Deployed: {data?.isDelayModuleDeployed ? 'Yes' : 'No'}</p>
      <p>Guardian Address: {data?.guardianAddress || 'Not set'}</p>
    </div>
  );
};

Last updated