Prevent token value being interpreted as Wei

This commit is contained in:
Pedro Pombeiro 2018-03-20 11:45:25 +01:00
parent cc86e5112e
commit 1d97979bc5
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647

View File

@ -126,7 +126,7 @@ async function sendTransaction (to, amount, gasPrice) {
const tokenContract = config.tokenContracts[config.token]
const contractAddress = tokenContract.address
const contract = new Contract(contractAddress, tokenContract.abi, customSigner)
const bigNumberAmount = ethers.utils.parseUnits(amount.toString())
const bigNumberAmount = ethers.utils.parseUnits(amount.toString(), 'ether')
await contract.transfer(to, bigNumberAmount)