Skip to content

feat: show full NFT metadata fields with raw JSON toggle on token page #75

@pthmas

Description

@pthmas

Problem

NFT token page only surfaces image, description, and attributes. All other metadata fields (custom properties, rarity scores, external_url, animation_url, etc.) are silently ignored. No way to inspect raw metadata JSON.

Proposed Solution

Add a Metadata section below the attributes card on the NFT token page with two modes:

Formatted view (default)

  • Render every key/value pair from token.metadata dynamically
  • Skip already-displayed fields: image, image_url, imageUrl, image_data, description, attributes
  • Format values: strings as text, numbers as monospace, URLs as anchor links, objects/arrays as pretty-printed JSON blocks
  • Section header: "Metadata" with a toggle button

Raw JSON view (toggle)

  • Switch button (e.g. "Formatted / Raw") in the section header
  • Renders JSON.stringify(token.metadata, null, 2) in a scrollable <pre> block with monospace font

UX details

  • Toggle state: useState local, default to formatted
  • Only show section when token.metadata !== null
  • Hide section when metadata_status !== 'fetched'

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions