Skip to content

Commit

Permalink
Fix mark scam collection
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Oct 1, 2024
1 parent d0e8ae4 commit 3fb9b4f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 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 @@ -246,12 +246,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);
}
mappedNfts = apiNfts?.map((x) => new Asset({ ...Asset.fromNft(x), scamInfo }));

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

0 comments on commit 3fb9b4f

Please sign in to comment.