Skip to content

Commit

Permalink
Merge pull request #948 from multiversx/SERVICES-1085-fix-collection-…
Browse files Browse the repository at this point in the history
…filtering

SERVICES-1085 exclude collection filtering when unique marketplace ad…
  • Loading branch information
johnykes authored Mar 16, 2023
2 parents 26a2445 + 2c40f38 commit 8cf8172
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/marketplaces/marketplaces-reindex.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,18 @@ export class MarketplacesReindexService {
);
}

const areMultipleMarketplaces = marketplaceReindexStates.length !== 1;

for (let i = 0; i < eventsSetSummaries?.length; i++) {
try {
if (!areMultipleMarketplaces) {
await this.processEvent(
marketplaceReindexStates[0],
eventsSetSummaries[i],
);
continue;
}

const stateIndex = marketplaceReindexStates.findIndex((s) =>
s.isCollectionListed(eventsSetSummaries[i].collection),
);
Expand Down

0 comments on commit 8cf8172

Please sign in to comment.