diff --git a/packages/handshake-api/src/index.js b/packages/handshake-api/src/index.js index a50775f0..ac6de6ec 100644 --- a/packages/handshake-api/src/index.js +++ b/packages/handshake-api/src/index.js @@ -85,13 +85,11 @@ const resolveDomainHandler = async (req, res) => { }; // Checks if the given string is a valid Sia link. -function isValidSkylink(link) { - if (!link || link.length === 0) { - return false; - } - return Boolean(link.match(startsWithSkylinkRegExp)); +function isValidSkylink(value) { + return Boolean(value && value.match(startsWithSkylinkRegExp)); } +// Checks if given string is a valid skynet registry entry function isValidRegistryEntry(value) { return Boolean(value && value.match(registryEntryRegExp)); }