@smartinvoicexyz/hooks
Version:
Unified source for React hooks used across the Smart Invoice protocol.
19 lines (18 loc) • 740 B
TypeScript
import { FormInvoice, InvoiceDetails, UseToastReturn } from '@smartinvoicexyz/types';
import { UseFormReturn } from 'react-hook-form';
import { Hex } from 'viem';
import { SimulateContractErrorType, WriteContractErrorType } from './types';
type AddMilestonesProps = {
address: Hex;
invoice: Partial<InvoiceDetails>;
localForm: UseFormReturn<Partial<FormInvoice>>;
toast: UseToastReturn;
onTxSuccess?: () => void;
};
export declare const useAddMilestones: ({ address, localForm, invoice, toast, onTxSuccess, }: AddMilestonesProps) => {
writeAsync: () => Promise<Hex | undefined>;
isLoading: boolean;
prepareError: SimulateContractErrorType | null;
writeError: WriteContractErrorType | null;
};
export {};