Using some code I found online I was able to do some stuff (In this case Approve....) But is there any way I can add a "fee" to this say 1 ether which will be sent to a specific address?
const transferHandler = async (e) => {
e.preventDefault();
let transferAmount = e.target.sendAmount.value;
let recieverAddress = e.target.recieverAddress.value;
let txt = await props.contract.approve(recieverAddress, transferAmount);
console.log(txt);
setTransferHash("Transfer confirmation hash: " + txt.hash);
}
Can I set a "let fee = 1; and include this in the let txt = await props.con.......?