Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ module.exports = {
'no-new': 'off',
'no-param-reassign': 'off',
'no-prototype-builtins': 'off',
'no-useless-escape': 'off',
radix: 'off',
'require-atomic-updates': 'off',

Expand Down
3 changes: 1 addition & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,7 @@ export function normalizeEnsName(ensName: string): string | null {
const normalized = ensNamehash.normalize(ensName.trim());
// this regex is only sufficient with the above call to ensNamehash.normalize
// TODO: change 7 in regex to 3 when shorter ENS domains are live
// eslint-disable-next-line require-unicode-regexp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Always great to see these removed.

if (normalized.match(/^(([\w\d\-]+)\.)*[\w\d\-]{7,}\.(eth|test)$/)) {
if (normalized.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u)) {
return normalized;
}
} catch (_) {
Expand Down