From 2c40f3864d2f6296b33c6d9c93ce834d2f12ed5d Mon Sep 17 00:00:00 2001 From: johnykes Date: Thu, 16 Mar 2023 09:59:25 +0200 Subject: [PATCH] SERVICES-1085 exclude collection filtering when unique marketplace address --- .../marketplaces/marketplaces-reindex.service.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/modules/marketplaces/marketplaces-reindex.service.ts b/src/modules/marketplaces/marketplaces-reindex.service.ts index 9652ea0ba..6f0100c74 100644 --- a/src/modules/marketplaces/marketplaces-reindex.service.ts +++ b/src/modules/marketplaces/marketplaces-reindex.service.ts @@ -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), );