I am using web3 and MetaMask for my dApp I have a deposit function in a contract. Now I know, that I could simply tell the user that he should send ether to a contract and the fallback function would do the rest.
But how can I do a manual deposit function where the user enters an amount on the website in an input field, clicks on a "Make deposit"-button and then needs to accept the MetaMask request where he sends the ethereum he entered together with the request to call deposit()?
Thanks! :)