From 84e54f33115457d600714af269a79a162005cf5f Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 3 Nov 2020 16:30:34 +0100 Subject: [PATCH] support skydb in hns --- packages/handshake-api/src/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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)); }