Closed eduramme closed 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?
The latest updates on your projects. Learn more about Vercel for Git ↗︎