From c54337c0da5e9f0f039eda10d06a00e77019294a Mon Sep 17 00:00:00 2001 From: nickkelly1 Date: Tue, 13 Aug 2024 13:46:31 -0500 Subject: [PATCH] fix: simplehash nft types --- packages/extension/src/libs/nft-handlers/types/simplehash.ts | 4 ++-- packages/extension/src/types/nft.ts | 4 ++-- .../views/network-nfts/components/network-nfts-category.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/extension/src/libs/nft-handlers/types/simplehash.ts b/packages/extension/src/libs/nft-handlers/types/simplehash.ts index 08efa9ebf..1aa2111a5 100644 --- a/packages/extension/src/libs/nft-handlers/types/simplehash.ts +++ b/packages/extension/src/libs/nft-handlers/types/simplehash.ts @@ -17,8 +17,8 @@ export interface SHNFTType { }; external_url: string; collection: { - name: string; - description: string; + name: null | string; + description: null | string; image_url: string; external_url: string; collection_id: string; diff --git a/packages/extension/src/types/nft.ts b/packages/extension/src/types/nft.ts index a7600f8ca..a1849f10e 100644 --- a/packages/extension/src/types/nft.ts +++ b/packages/extension/src/types/nft.ts @@ -13,9 +13,9 @@ export interface NFTItem { type: NFTType; } export interface NFTCollection { - name: string; + name: null | string; image: string; - description: string; + description: null | string; items: NFTItem[]; contract: string; } diff --git a/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-category.vue b/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-category.vue index 751b70c7f..f2f492625 100644 --- a/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-category.vue +++ b/packages/extension/src/ui/action/views/network-nfts/components/network-nfts-category.vue @@ -3,9 +3,9 @@

{{ - collection.name.length > 25 + collection.name?.length > 25 ? $filters.replaceWithEllipsis(collection.name, 25, 4) - : collection.name + : collection.name || "UNKNOWN" }}