Skip to content

Commit

Permalink
Fix isEnsName check
Browse files Browse the repository at this point in the history
  • Loading branch information
cgero-eth committed Mar 14, 2024
1 parent 42e7144 commit 4c1e4d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/utils/ensUtils/ensUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class EnsUtils {
* @param value The value to be checked.
* @returns True when the given value is a valid ENS name, false otherwise.
*/
isEnsName = (value?: string): boolean => (value != null ? this.ensPattern.test(value) : false);
isEnsName = (value?: string): boolean => (value != null && value.length > 6 ? this.ensPattern.test(value) : false);

/**
* Truncates the ENS name by displaying the first 5 characters and the eth suffix.
Expand Down

0 comments on commit 4c1e4d4

Please sign in to comment.