unstoppabledomains / resolution

A library to resolve blockchain domain names.
MIT License
222 stars 66 forks source link

Valid domains starting with `0x` are considered to be namehashes #209

Closed mvlabat closed 2 years ago

mvlabat commented 2 years ago

I've just stumbled upon this line in the source code:

https://github.com/unstoppabledomains/resolution/blob/053afe844749c79d2477c0ad99b72bab83065f46/src/UnsInternal.ts#L77

It'll mistakenly treat a valid domain name such as 0x.crypto as a namehash.

enaqx commented 2 years ago

Tests for this case added https://github.com/unstoppabledomains/resolution/commit/ecee48f829ca2ad4e381320f1c7ff25091080e67#diff-7b33c3b8600f84f0a951a387dc59ac06e940c3403d57438f8fd99ddd892c666eR384

Thanks!