Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BAYC compatibility #170

Merged
merged 4 commits into from
Nov 23, 2021
Merged

Fix BAYC compatibility #170

merged 4 commits into from
Nov 23, 2021

Conversation

dibeling
Copy link
Contributor

I updated utils.test.tsx with 2 Boring Ape NFTs that don't work and 2 NFTs that do work properly.

The error happens in src/fetchers/shared/fetch-metadata.tsx at line 40 - "Invalid data received"

I'm not sure what the cause is, but note that the Boring Ape NFTs don't have "name" or "description" in their metadata. If that is the issue, I believe this would be a simple fix.

Boring Apes:
https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/6262
https://boredapeyachtclub.com/api/mutants/26708

Copy link
Owner

@bpierre bpierre left a comment

Choose a reason for hiding this comment

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

Thank you for this PR! The issue was with isNftMetadata(), which was a little bit too strict.

I also added a mock function to deal with fetch() in Jest, and I moved the new tests in their own file.

I think this is good to be merged & release, could you confirm that it now works for you before I merge the PR? Thanks! 🙏

@dibeling
Copy link
Contributor Author

Yes, this works now. Many thanks!

@bpierre bpierre changed the title fetchMetadata() doesn't work for 2 Boring Ape NFTs Fix BAYC compatibility Nov 23, 2021
@bpierre bpierre merged commit 1318454 into bpierre:main Nov 23, 2021
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.

None yet

2 participants