Skip to content

Conversation

@Emmanueluko3
Copy link
Contributor

Feat: added Domain support

@vercel
Copy link

vercel bot commented Jun 22, 2023

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

Name Status Preview Updated (UTC)
app ✅ Ready (Inspect) Visit Preview Jun 22, 2023 0:04am

const output = useAddressLookup(inputValue);
const { resolvedDomain, errorMessage } = output;

console.log("resolved domain error", errorMessage);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this and the commented lines below


useEffect(() => {
const address = safeParsePublicKey(resolvedDomain);
console.log("address is ", address);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

});
}
setInputValue(addressString);
// const address = safeParsePublicKey(addressString);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove if not needed

} else return null;
};

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can probably simplify these a little - rather than having three useEffects, you can probably just have one, which calls walletNameToAddressAndProfilePicture if the inputProp is a domain. I don't think you need to store the intermediary results walletDomainName and resolvedDomain in state hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants