Repository navigation
Document that parseUnits now throws on empty input (since 2.55.4) #5208
alvinlicro
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Since 2.55.4,
parseUnits(andparseEther/parseGwei) throws on inputs it used to accept:The same applies to
'.','-'and'-.'.This came from #4859 / #4860, but those PRs' changeset was removed, so the release notes don't mention it. Apps that pass raw form input to
parseUnits(an empty amount field, for example) crash after upgrading.Could the
parseUnitsdocs state that empty or partial inputs throwInvalidDecimalNumberError, and could the changelog note it as a behavior change?All reactions