Skip to content
Alchemy Logo

useWaitForCallsStatus

function useWaitForCallsStatus(params): UseWaitForCallsStatusResult;

Defined in: account-kit/react/src/hooks/useWaitForCallsStatus.ts:46

Hook to wait for calls status to be confirmed. It will poll until the calls reach the desired status or until a timeout occurs.

import { useWaitForCallsStatus } from "@account-kit/react";
 
function MyComponent() {
  const {
    data: result,
    isLoading,
    error,
  } = useWaitForCallsStatus({
    client: smartWalletClient,
    id: "0x1234...", // The call ID from sendPreparedCalls
    timeout: 30_000, // 30 second timeout
  });
}

ParameterTypeDescription

params

UseWaitForCallsStatusParams

Parameters for the hook

UseWaitForCallsStatusResult

Query result containing the final status

Was this page helpful?