You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While setting up form field validation for an Ethereum address field I ran into a small bug that throws an uncaught error if provider.resolveName is called with a string ending in a "." character. It looks like the bug is ultimately happening in namehash.ts in the namehash function.
The attempt to access the third matching group here throws the error because partition is null because the Partition regex will not match a string ending in ".". Not sure if it makes sense to update the regex to ^((.*)\\.)?([^.]*)$ or add a null check for partition or something else.
Thanks so much for the awesome lib!
The text was updated successfully, but these errors were encountered:
ricmoo
added
on-deck
This Enhancement or Bug is currently being worked on.
bug
Verified to be an issue.
and removed
investigate
Under investigation and may be a bug.
labels
May 25, 2021
ricmoo
added
fixed/complete
This Bug is fixed or Enhancement is complete and published.
and removed
on-deck
This Enhancement or Bug is currently being worked on.
labels
Jun 1, 2021
Describe the bug
While setting up form field validation for an Ethereum address field I ran into a small bug that throws an uncaught error if provider.resolveName is called with a string ending in a "." character. It looks like the bug is ultimately happening in namehash.ts in the namehash function.
ethers.js/packages/hash/src.ts/namehash.ts
Line 36 in d395d16
The attempt to access the third matching group here throws the error because partition is null because the Partition regex will not match a string ending in ".". Not sure if it makes sense to update the regex to
^((.*)\\.)?([^.]*)$
or add a null check for partition or something else.Thanks so much for the awesome lib!
The text was updated successfully, but these errors were encountered: