0.0.2 • Published 2 years ago

@cryc/tx-modal v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

tx-modal

Render a modal that shows every step of a transaction

const MyComponent: React.FC = () => {
  const { txState, execTransaction, reset } = useContractTx()
  
  const run = async () => {
    await execTransaction(() => {
      //...
    })
  }

  return <>
    <TxModal txState={txState} done={reset} />
    <button onClick={run}>Run tx</button>
  </>
}