Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

// Original version of the code without demo messages

// Function to speak out messages


function speak(message, delay = 0) {
const synth = window.speechSynthesis;
const utterance = new SpeechSynthesisUtterance(message);
utterance.rate = 0.8;
setTimeout(() => {
synth.speak(utterance);
}, delay);
}

// Prompt user for inputs for the actual transaction process


let senderAddress = prompt("Enter sender's address:");
let recipientAddress = prompt("Enter recipient's address:");

// Perform the transaction if both sender and recipient addresses are provided
if (senderAddress && recipientAddress) {
// Perform actual transaction process here
console.log("Performing transaction from", senderAddress, "to",
recipientAddress);
// You may want to add further code for the transaction process here
} else {
console.log("Transaction successful or valid input.");
}

You might also like