Skip to content

Commit

Permalink
Merge pull request #1080 from multiversx/FixMarkScamCollection
Browse files Browse the repository at this point in the history
Fix mark scam collection
  • Loading branch information
danielailie authored Oct 1, 2024
2 parents d0e8ae4 + db6308c commit 62d5e44
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/modules/scam/nft-scam.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class NftScamService {
private readonly pluginsService: PluginService,
private readonly cacheEventsPublisher: CacheEventsPublisherService,
private readonly logger: Logger,
) {}
) { }

async validateNftScamInfoForIdentifier(identifier: string): Promise<boolean> {
const nft = await this.assetByIdentifierService.getAsset(identifier);
Expand Down Expand Up @@ -245,13 +245,7 @@ export class NftScamService {

const apiNfts = await this.mxApiService.getNftsByIdentifiers(nftsMissingFromDb?.map((x) => x.identifier));
if (!apiNfts) return;
let mappedNfts: Asset[] = [];
if (scamInfo.type === ScamInfoTypeEnum.none) {
mappedNfts = apiNfts?.map((x) => new Asset({ ...Asset.fromNft(x), scamInfo }));
} else {
mappedNfts = apiNfts?.map((x) => Asset.fromNft(x));
await this.pluginsService.computeScamInfo(mappedNfts);
}
let mappedNfts: Asset[] = apiNfts?.map((x) => new Asset({ ...Asset.fromNft(x), scamInfo }));

await this.updateBulkScamInfo(scamEngineVersion, mappedNfts);
}
Expand Down

0 comments on commit 62d5e44

Please sign in to comment.