From c0515214d4a7f8a2fe9d9687d181132afc2a741a Mon Sep 17 00:00:00 2001 From: Catalin Faur <52102171+cfaur09@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:11:08 +0200 Subject: [PATCH] check if nft.type exist and add NftSubType filter (#1394) --- src/endpoints/nfts/nft.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/endpoints/nfts/nft.service.ts b/src/endpoints/nfts/nft.service.ts index 1c357d8ef..e0af78f6b 100644 --- a/src/endpoints/nfts/nft.service.ts +++ b/src/endpoints/nfts/nft.service.ts @@ -31,6 +31,7 @@ import { NftRarities } from "./entities/nft.rarities"; import { SortCollectionNfts } from "../collections/entities/sort.collection.nfts"; import { TokenAssets } from "src/common/assets/entities/token.assets"; import { ScamInfo } from "src/common/entities/scam-info.dto"; +import { NftSubType } from "./entities/nft.sub.type"; @Injectable() export class NftService { @@ -217,7 +218,10 @@ export class NftService { return undefined; } - if (nft.type.in(NftType.SemiFungibleESDT, NftType.MetaESDT)) { + if (nft.type && nft.type.in( + NftType.SemiFungibleESDT, NftType.MetaESDT, + NftSubType.DynamicSemiFungibleESDT, NftSubType.DynamicMetaESDT + )) { await this.applySupply(nft); }