From d10d9023a812dcd75de700ddf9392c7818674b07 Mon Sep 17 00:00:00 2001 From: Hassan Malik Date: Thu, 1 Feb 2024 08:21:53 -0500 Subject: [PATCH] changes per review --- SIPS/sip-12.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SIPS/sip-12.md b/SIPS/sip-12.md index cfa8377..3cd288c 100644 --- a/SIPS/sip-12.md +++ b/SIPS/sip-12.md @@ -69,7 +69,7 @@ This permission is specified as follows in `snap.manifest.json` files: 2. `schemes` - An optional non-empty array of prefixes that the snap expects for non-tld domain lookup. -**Note:** Tld domains are presumed to end with "." and one of the `tlds`. Non-tld domains are presumed to start with one of the `schemes` followed by ":" then the domain. Respectively, an example of each would be `hassan.lens` and `farcaster:hbm88`. +**Note:** TLD domains are presumed to end with "." and one of the `tlds`. Non-tld domains are presumed to start with one of the `schemes` followed by ":" then the domain. Respectively, an example of each would be `hassan.lens` and `farcaster:hbm88`. ### Snap Implementation @@ -83,12 +83,17 @@ export const onNameLookup: OnNameLookupHandler = async ({ domain, address }) => { + let resolution; + if (domain) { - return { resolvedAddresses: /* Get domain resolution */ } + + resolution = { protocol: /* Domain protocol */ , resolvedAddress: /* Get domain resolution */ }; + return { resolvedAddresses: [insight] }; } if (address) { - return { resolvedDomains: /* Get address resolution */ }; + resolution = { protocol: /* Domain protocol */, resolvedDomain: /* Get address resolution */ }; + return { resolvedDomains: [insight] }; } return null;