This is how amounts are represented
{
"unit": "ether",
"value": 1
}
Since value may still be a big number, it should be represented as a string and not a number type.
For reference, ethers.utils.parseUnits(1, 'ether') throws and ethers.utils.parseUnits('1', 'ether') succeeds.
This is how amounts are represented
Since
valuemay still be a big number, it should be represented as a string and not a number type.For reference,
ethers.utils.parseUnits(1, 'ether')throws andethers.utils.parseUnits('1', 'ether')succeeds.