From 0e519563bd010cd7b854782004c4fb7cbbf4b180 Mon Sep 17 00:00:00 2001 From: beemdvp Date: Mon, 18 Mar 2024 20:49:15 +0000 Subject: [PATCH] feat: add address check to authenticity --- src/index.ts | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index 49bbbf9..fffe0ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -168,21 +168,11 @@ export default class RnsSDK { }; } - for (let i = 0; i < domainInterests.length; i++) { - - const interestDomain = domainInterests[i]; - - if (interestDomain.name === domain) { - return { - isAuthentic: true - }; - } - - } + const isAuthentic = domainInterests.find((interestDomain) => interestDomain.name === domain)?.address === accountAddress; return { - isAuthentic: false - }; + isAuthentic + } }