@smartinvoicexyz/hooks
Version:
Unified source for React hooks used across the Smart Invoice protocol.
17 lines (16 loc) • 620 B
TypeScript
import { InvoiceDetails, UseToastReturn } from '@smartinvoicexyz/types';
import { Hex } from 'viem';
import { SimulateContractErrorType, WriteContractErrorType } from './types';
export declare const useDeposit: ({ invoice, amount, hasAmount, paymentType, onTxSuccess, toast, }: {
invoice: InvoiceDetails;
amount: bigint;
hasAmount: boolean;
paymentType: string;
onTxSuccess?: () => void;
toast: UseToastReturn;
}) => {
handleDeposit: () => Promise<Hex | undefined>;
isLoading: boolean;
prepareError: SimulateContractErrorType | null;
writeError: WriteContractErrorType | null;
};