Hey @dan-i thank you for the response! The 0 and 1 I just had as a representation of the heads or tails choice for my radio buttons.
It happens specifically when Iâm running the addBet button after you input how much youâd like to bet for the coin flip game. It seems to specifically be happening here in my JS file right around the .send() spot. I think it has to do with what I have set up for config to convert the input from ether to wei as thatâs what I figured would make the most sense for someone wanting to bet a certain amount.
function inputBetData() {
let bet = $("#bet_input").val();
let config = {
value: web3.utils.toWei(bet, "ether")
}
console.log(config);
contractInstance.methods.setBet(bet).send(config)
.on("transactionHash", function(hash){
console.log(hash);
})
.on("confirmation", function(confirmationNr){
console.log(confirmationNr);
})
.on("receipt", function(receipt){
console.log(receipt);
})
};
I was able to mess with it a bit and did get it to work, but it then takes the input only as wei and does not convert it to ether. Would there be a better way for me to do this if it does seem to be an error with the jquery not taking my config variable to convert the input to wei?