Skip to content

Conversation

@JeffreyDoyle
Copy link
Member

Adds Interaction Template generation/query & display for transactions generated by NFT Catalog

@vercel
Copy link

vercel bot commented Nov 9, 2022

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

Name Status Preview Updated
nft-catalog ✅ Ready (Inspect) Visit Preview Nov 16, 2022 at 10:33PM (UTC)

useEffect(() => {
async function getInteractionTemplateAudits() {
if (interactionTemplateData) {
const auditors = await fetch(`https://flix.flow.com/v1/auditors?network=${network}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing this data is relatively static? Does the FLIX API serve the necessary Cache-Control logic to allow the browser to cache this locally?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea this endpoint is fairly static! The API also sits behind a cache. I'll look into the FLIX API to be sure we're setting the correct headers!

Copy link
Contributor

@aishairzay aishairzay left a comment

Choose a reason for hiding this comment

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

Thanks for the PR Jeff!

For a lot of the interaction templates, I get back a This transaction is not supported or something similar. Can we choose to say that before making the API call to generate? It's a somewhat frustrating UX as it is IMO. Also explaining why a TX can or can't be used as an interaction template at some point might be useful to help educate developers about the system, and how its used.

@JeffreyDoyle
Copy link
Member Author

Hey @aishairzay

The error: This transaction is not supported happens when the project uses differently named contracts on mainnet and testnet, which causes issues with the Interaction Template format. I can look into optimizing to show the error soon! I can also improve the error messaging as well!

@aishairzay
Copy link
Contributor

Is there a way we can not have an error? Or at a minimum predict if there will be an error prior to the API call and not give the generate interaction template option if so?

Goal here is to make this a seamless process rather than confuse developers

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.

4 participants