diff --git a/packages/desktop/views/dashboard/collectibles/components/CollectionDetails.svelte b/packages/desktop/views/dashboard/collectibles/components/CollectionDetails.svelte index 91324eb7ac..9983cdd2ee 100644 --- a/packages/desktop/views/dashboard/collectibles/components/CollectionDetails.svelte +++ b/packages/desktop/views/dashboard/collectibles/components/CollectionDetails.svelte @@ -5,7 +5,7 @@ export let collectionId: string - $: nfts = $ownedNfts.filter((nft) => nft.collectionId === collectionId) + $: nfts = $ownedNfts.filter((nft) => nft.collectionId === collectionId && !nft.hidden && !nft.isScam) onDestroy(() => { $selectedCollectionId = undefined diff --git a/packages/desktop/views/dashboard/collectibles/components/CollectionsGalleryItem.svelte b/packages/desktop/views/dashboard/collectibles/components/CollectionsGalleryItem.svelte index 734d87613e..c49a2d2d6c 100644 --- a/packages/desktop/views/dashboard/collectibles/components/CollectionsGalleryItem.svelte +++ b/packages/desktop/views/dashboard/collectibles/components/CollectionsGalleryItem.svelte @@ -14,7 +14,7 @@ } $: collection = $persistedCollections[collectionId] - $: nfts = $ownedNfts.filter((nft) => nft.collectionId === collectionId) + $: nfts = $ownedNfts.filter((nft) => nft.collectionId === collectionId && !nft.hidden && !nft.isScam) {#if collection && nfts.length > 0} diff --git a/packages/desktop/views/dashboard/collectibles/views/CollectionsGalleryView.svelte b/packages/desktop/views/dashboard/collectibles/views/CollectionsGalleryView.svelte index 8c56975489..6abe2b9c17 100644 --- a/packages/desktop/views/dashboard/collectibles/views/CollectionsGalleryView.svelte +++ b/packages/desktop/views/dashboard/collectibles/views/CollectionsGalleryView.svelte @@ -11,17 +11,18 @@ let queriedCollectionsIds: string[] = [] - $: collectionsIds = new Set( - $ownedNfts - ?.map((nft) => nft.collectionId) - .filter((collectionId) => collectionId && $persistedCollections[collectionId]) - ) + $: collectionsIds = $ownedNfts?.reduce((set, nft) => { + if (!nft.hidden && !nft.isScam && nft.collectionId && $persistedCollections[nft.collectionId]) { + set.add(nft.collectionId) + } + return set + }, new Set()) $: $collectionsSearchTerm, collectionsIds, setQueriedCollectionsIds() function setQueriedCollectionsIds(): void { queriedCollectionsIds = Array.from(collectionsIds) - .filter((collectionId) => isVisibleCollection($persistedCollections[collectionId])) + ?.filter((collectionId) => isVisibleCollection($persistedCollections[collectionId])) .sort((collectionId1, collectionId2) => $persistedCollections[collectionId1]?.name .toLowerCase()