From 5c48ad424ee36e1c7c4e92e2fabc4245c8bf821f Mon Sep 17 00:00:00 2001 From: Dawid Sowa Date: Mon, 8 Apr 2024 10:39:54 +0200 Subject: [PATCH] fix: change display of `Instant` metadata [PTD-1276] --- .../ui/src/components/metadata/TypedMetadataRenderer.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/components/metadata/TypedMetadataRenderer.svelte b/packages/ui/src/components/metadata/TypedMetadataRenderer.svelte index 30c8d571b..b287b8bb1 100644 --- a/packages/ui/src/components/metadata/TypedMetadataRenderer.svelte +++ b/packages/ui/src/components/metadata/TypedMetadataRenderer.svelte @@ -60,10 +60,8 @@ {:else if metadataTypedValue.type === 'Bool' || metadataTypedValue.type === 'Decimal' || metadataTypedValue.type === 'I32' || metadataTypedValue.type === 'I64' || metadataTypedValue.type === 'NonFungibleLocalId' || metadataTypedValue.type === 'String' || metadataTypedValue.type === 'U32' || metadataTypedValue.type === 'U64' || metadataTypedValue.type === 'U8'} {metadataTypedValue.value} {:else if metadataTypedValue.type === 'Instant'} - {new Date(Number(metadataTypedValue.value) * 1000)} + {new Date(metadataTypedValue.value)} {:else if metadataTypedValue.type === 'InstantArray'} - {metadataTypedValue.values - .map((value) => new Date(Number(value) * 1000)) - .join(', ')} + {metadataTypedValue.values.map((value) => new Date(value)).join(', ')} {/if} {/if}