From 2154fe2256042acb9766ce3b92b6c15d43f3194f Mon Sep 17 00:00:00 2001
From: 0xIchigo <0xIchigo@protonmail.com>
Date: Sat, 30 Dec 2023 01:11:22 -0500
Subject: [PATCH] Make JSON Metadata Nicer For Tokens
---
src/lib/components/json.svelte | 14 ++++++++------
src/routes/token/[token]/+page.svelte | 20 +++++++++++++-------
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/src/lib/components/json.svelte b/src/lib/components/json.svelte
index 780c80de..1d2dca85 100644
--- a/src/lib/components/json.svelte
+++ b/src/lib/components/json.svelte
@@ -25,12 +25,14 @@
>
+ {#if label !== "token"}
+ {/if}
@@ -54,16 +54,17 @@
Enriched transaction data from the Helius API
{:else if label === "raw"}
Raw transaction data from the Solana RPC
- {:else if label === "token"}
- View the metadata for this NFT
{/if}
+ {#if label === "token"}
+
Copy JSON
+ {/if}
+ {#if label !== "token"}
(showCode = !showCode)}
@@ -80,9 +81,10 @@
/>
{/if}
+ {/if}
- {#if showCode}
+ {#if showCode || label === "token"}
diff --git a/src/routes/token/[token]/+page.svelte b/src/routes/token/[token]/+page.svelte
index 1e537dc6..685478ab 100644
--- a/src/routes/token/[token]/+page.svelte
+++ b/src/routes/token/[token]/+page.svelte
@@ -475,6 +475,19 @@
{/if}
+
+
+
+
+
+
{#key metadata.compressed}
{/key}
-
-
-
-
{/if}