I have a problem with using the deposit () function on a smart contract. How do you use metamask 0.20.7 ?

const contractInstance = web3.eth.contract(contractAbi).at(contractAddress);
contractInstance.deposit({ from: web3.eth.accounts[0], value: web3.toHex(web3.toWei(0.1, 'ether'))}, function(err, result){ console.log(result); } );

How is it so that a user can only click and automatically release it in metamask with a number of 0.1 ETH ? I can't spend that amount when using it, but only get 0 ETH from it.

Image Here

1 Answer 1


regarding the issue in the image: I had the issue with MetaMask a couple times too for two reasons. Once it just didn't go through due to a wrong gas setting, the other times the issue was with the separator "0,1" vs "0.1" depending on your language settings. Maybe this helps.

  • Hello thanks for the answer, but it did not work. I thought that using web3js would work, but it didn't work in Metamask.
    – Zoro Raka
    Commented Sep 6, 2019 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.