1

When i run this code i get undefined logged in the console.

const send = async () => {
    const params = {
      from: App.currentAccount,
      to: recipient,
      value: amount,
      data: ethers.utils.hexlify(ethers.utils.toUtf8Bytes(message))
    }
    const tx = await window.ethereum.request({method: "eth_sendTransaction", params: [params]})
    console.log(await tx.hash)
  }

once the transaction is signed it should show the tx hash so i can create a link to etherscan

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.