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

Make metadata with attribute_type attribute_value keys display correctly #4144

Open
casey opened this issue Dec 21, 2024 · 0 comments
Open

Comments

@casey
Copy link
Collaborator

casey commented Dec 21, 2024

For reasons not known to me, lots of inscriptions use NFTs where attributes are stored as a list of objects that looks like:

            "attributes": [
                {
                    "trait_type": "Clan",
                    "value": "Aoi"
                },
                {
                    "trait_type": "Class",
                    "value": "Warrior"
                }
            ]

We should make these display correctly. I'm not sure the best way to do this, but I think it would be pretty reasonable to scan deserialized metadata for lists that contain objects whose top level keys are trait_type and value and replace these with simple dictionaries mapping the trait name to the value, as god intended.

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

No branches or pull requests

1 participant