diff --git a/packages/payload/packages/xns/plugins/record/src/helpers/name/Name.ts b/packages/payload/packages/xns/plugins/record/src/helpers/name/Name.ts index af6475e4a..f623f74ae 100644 --- a/packages/payload/packages/xns/plugins/record/src/helpers/name/Name.ts +++ b/packages/payload/packages/xns/plugins/record/src/helpers/name/Name.ts @@ -65,10 +65,9 @@ export class XnsNameHelper { * @returns ValidSourceTypes */ static isPotentialXnsNameOrHash(source?: string): ValidSourceTypes { + if (isHash(source)) return 'hash' const xnsName = XnsNameHelper.ValidTLDs.some(tld => source?.endsWith(tld)) ? source : null - const hash = isHash(source) ? source : null - - return xnsName ? 'xnsName' : hash ? 'hash' : null + return xnsName ? 'xnsName' : null } static isValid(domainRegistration: DomainRegistration) {