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: show available metadata for stacks nfts #6090

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

pete-watters
Copy link
Contributor

@pete-watters pete-watters commented Jan 28, 2025

Try out Leather build 37efb5bExtension build, Test report, Storybook, Chromatic

This PR adds an improvement to show the available metadata we have for Stacks NFTs so users can see their names in the wallet

Screenshot 2025-01-28 at 16 34 38

@pete-watters pete-watters linked an issue Jan 28, 2025 that may be closed by this pull request
@pete-watters pete-watters marked this pull request as ready for review January 28, 2025 16:53
@pete-watters pete-watters self-assigned this Jan 29, 2025
<ImageUnavailable />
</CollectibleItemLayout>
);
const isImageAvailable = src && isValidUrl(src);
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the issue is that src is undefined, we have a mismatch between runtime and our types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It comes back as undefined for video / audio NFT's only. Maybe I need to add a new type for those NFTs?

We can't play them anyway as the token_uri is not giving us a valid video file.

Screenshot 2025-01-27 at 15 56 45

This change basically keeps the code as it was before but displays the metadata we do have rather than a larger Image not found card:
Screenshot 2025-01-29 at 10 46 58

Copy link
Collaborator

Choose a reason for hiding this comment

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

zod schema checking here would be great too, but so long as the types align with the runtime I'm happy

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.

Support showing/playing video and music Stacks NFTs
3 participants