Hey guys, I’ve been following this tutorial for building web3 DEX https://www.youtube.com/watch?v=t8U7GRrlYW8&ab_channel=MoralisWeb3 but implementing it to my own project, so had to do few adjustments. I build my app in NextJS with Typescript and when running the useSendTransaction() from wagmi I get TS error and I cannot figure out what it is. I went through all the docs and nothing works properly, and ChatGPT doesn’t know either.
Anyone more experienced who could help me solve it please? I’m not so proficient in TS so have no clue what to do next.
Cannot deploy my app like that, cause npm run build gives me error. When running in dev mode it works, still notifies me about the error, but it works.
Thank you!
code snippet:
const [txDetails, setTxDetails] = useState({
to: null,
data: null,
value: null,
})
const { address, isConnected } = useAccount();
const { data, sendTransaction } = useSendTransaction({
account: address,
to: String(txDetails.to),
data: String(txDetails.data),
value: String(txDetails.value),
});
and the errors I’m getting are for the data and value.