I want use MetaMask to send ETH or ERC20 Tokens
The following script i am using is throwing error,
RPC Error: Error: Invalid transaction value of 0.001 number must be in wei
const method = 'eth_sendTransaction'
const parameters = [{
from: account,
to: to,
value: 0.001
}]
const from = account
const payload = {
method: method,
params: parameters,
from: from,
}
web3.currentProvider.sendAsync(payload, function (err, response) {
});