blockful-io / external-resolver-dapp

https://external-resolver-dapp.vercel.app
2 stars 2 forks source link

137 feat integrate ensip 16 v2 to manage domain page #152

Closed eduramme closed 2 months ago

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nameful ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 0:47am
qa-nameful ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 0:47am
eduramme commented 2 months ago

@FrancoAguzzi

@eduramme very nice! I like it!

But the exclamation is yet a question for me: can you write a comment above it saying that if resolverAdd is null, the function will return an error which will be handled somehow?

Actually I just noticed that this function would not throw an explainative error for whoever called it because it is not inside a try catch block, can you add it? pls :) 🙏🏼 Then the comment mentioned can say that whenever resolverAdd is null, an error will be thrown by "readContract" call

I think the function will look shiny then + will share the error with the parent call

WDYT?

It's actually inside a try...catch block. The readContract function throws an error, which is caught by the getENSDomainDataThroughResolver function and then passed to getENSDomainData, within a try...catch block. If no resolver is found, the default ENS resolver will be used to resolve the domain's data.

I don't think this is the ideal behavior, but since we're focusing on the happy path to save time, I decided it's best not to worry about scenarios where a domain has no resolver for now. What do you think?