MetaMask - RPC Error: Error: Invalid transaction value of 0.001 number must be in wei

MetaMask - RPC Error: Error: Invalid transaction value of 0.001 number must be in wei

我想使用 MetaMask 发送 ETH 或 ERC20 代币
我正在使用的以下脚本抛出错误,

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) {

}); 
In Ether, the smallest unit of the currency is wei, and 1 ETH === 10^18 wei 

var weiValue = web3.utils.toWei('1', 'ether'); // 1 ether
console.log(weiValue);//1000000000000000000