Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/smazurs/WaveWallet
Browse files Browse the repository at this point in the history
  • Loading branch information
smazurs committed Mar 10, 2024
2 parents 749d14a + 34c532d commit ead49e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/templates/transfers/ETH/ETHTransfers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ const ETHTransfers = () => {
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
ethers.utils.getAddress(recipient); // Validates the address
ethers.utils.getAddress(recipient); // Validates the address
const tx = await signer.sendTransaction({
to: recipient,
value: ethers.utils.parseEther(amount),
});
console.log("tx", tx);
setTxs([tx]);
console.log("tx", tx);
setTxs([tx]);
toast({
title: "Transaction Submitted",
description: `Transaction hash: ${tx.hash}`,
Expand All @@ -52,6 +55,12 @@ const ETHTransfers = () => {
}
};

// Function to handle the receiving process (listening for Arduino confirmation)
const handleReceive = () => {
window.open("http://localhost:http://127.0.0.1:5000/", "_blank");
};

// UI components for entering transaction details, sending, and receiving
return (
<Box padding="4" maxW="md">
<Heading mb="6">Send ETH</Heading>
Expand Down

0 comments on commit ead49e3

Please sign in to comment.