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 metaplex metadata already parsed #149

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

Conversation

swaggymarie
Copy link
Contributor

No description provided.

@@ -155,17 +155,14 @@ async function getMetaplexMetadataForToken(
const decodedMetadata = deserializeMetadata(
tokenMetaDataAccount as unknown as RpcAccount
);
const uriRes = await fetch(decodedMetadata.uri);
Copy link
Member

Choose a reason for hiding this comment

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

This is actually needed as the URI contains parts of the data not just the token metadata. Its actually the URI that contains the image url.
Screenshot 2024-06-07 at 9 34 43 PM

Screenshot 2024-06-07 at 9 34 58 PM Screenshot 2024-06-07 at 9 35 03 PM

Copy link
Member

Choose a reason for hiding this comment

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

And ONLY for the image is why we do it this way..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the uri is actually only the image link, so we were trying to parse the png format as json (what's inside the image url)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor Author

@swaggymarie swaggymarie Jun 7, 2024

Choose a reason for hiding this comment

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

image

you can see here uri is the right url

Copy link
Contributor Author

@swaggymarie swaggymarie Jun 7, 2024

Choose a reason for hiding this comment

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

what's the standard and should we change our way to create metadata to align?

Copy link
Member

Choose a reason for hiding this comment

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

The metadata there isn't standard... So it's not following it, yes I'd encourage our adherence to the metadata standard.

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.

2 participants