Iām using the Moralis demo on
So Iām able to initiate a transfer after User authentication via Walletconnect but Iād love the transfer amount to be defined by the user.
I introduced an input form with Id āamountOfETHā and tried to replace the amount value with the input of the form. But that doesnāt work. It doesnāt pass the inputed amount. How do I make the transfer function to work with user defined amount???
<script>
function runcode(){
Moralis.transfer({type:"native", receiver:"0x...",amount:Moralis.Units.ETH(document.getElementByid('amountOfETH').value)});
}
</script>
<main>
<section class="buttons">
<button id="btn-auth">Connect Wallet</button>
<button id="btn-auth" value="click" onclick="runcode()">Pay Now</button>
</main>
<!-- scripts -->
<script src="script.js"></script>