import { useEffect } from "react"; import { Hash } from "viem" import { useWaitForTransactionReceipt } from "wagmi"; import styles from "../styles/Modal.module.css" interface WaitingForTxModalProps { hash: Hash, callbackFn: () => void; } const WaitingForTxModal = ({ hash, callbackFn }: WaitingForTxModalProps) => { const { isFetched } = useWaitForTransactionReceipt({ hash }) useEffect(() => { if (isFetched) { callbackFn() } }, [isFetched, callbackFn]) return

Spinning the chain ...

} export default WaitingForTxModal