import React, { useEffect, useState } from "react"; import { W3Wrapper } from "../W3Wrapper"; import { useRelayTx } from "../../sdk/microbridge/react"; import { useEthers } from "@usedapp/core"; export interface PageProps { txHash: string; } const BridgeHooksTest = (params: PageProps) => { const [relayTxDone, setRelayDone] = useState(); const relayTx = useRelayTx(); const { account } = useEthers(); useEffect(() => { console.log(params.txHash, relayTx); if (params.txHash && account) relayTx(122, 42220, params.txHash) .catch(e => e.message) .then(setRelayDone); }, [params, account]); return