diff --git a/src/common/indexer/elastic/elastic.indexer.helper.ts b/src/common/indexer/elastic/elastic.indexer.helper.ts index 6d7ca2e8f..83dd8c279 100644 --- a/src/common/indexer/elastic/elastic.indexer.helper.ts +++ b/src/common/indexer/elastic/elastic.indexer.helper.ts @@ -260,7 +260,7 @@ export class ElasticIndexerHelper { } if (filter.excludeMetaESDT === true) { - elasticQuery = elasticQuery.withMustMultiShouldCondition([NftType.SemiFungibleESDT, NftType.NonFungibleESDT], type => QueryType.Match('type', type)); + elasticQuery = elasticQuery.withMustMultiShouldCondition([...this.nonFungibleEsdtTypes, ...this.semiFungibleEsdtTypes], type => QueryType.Match('type', type)); } return elasticQuery; diff --git a/src/test/unit/services/mex.token.charts.spec.ts b/src/test/unit/services/mex.token.charts.spec.ts index 559136506..2c41bc2cc 100644 --- a/src/test/unit/services/mex.token.charts.spec.ts +++ b/src/test/unit/services/mex.token.charts.spec.ts @@ -57,7 +57,7 @@ describe('MexTokenChartsService', () => { jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue(mockData); jest.spyOn(mexTokenService, 'getMexTokenByIdentifier').mockResolvedValue(mockToken); - jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true); + jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true); const result = await mexTokenChartsService.getTokenPricesHourResolutionRaw('TOKEN-123456'); @@ -71,7 +71,7 @@ describe('MexTokenChartsService', () => { it('should return an empty array when no data is available', async () => { jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue({}); - jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true); + jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true); const result = await mexTokenChartsService.getTokenPricesHourResolutionRaw('TOKEN-123456'); @@ -92,7 +92,7 @@ describe('MexTokenChartsService', () => { jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue(mockData); jest.spyOn(mexTokenService, 'getMexTokenByIdentifier').mockResolvedValue(mockToken); - jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true); + jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true); const result = await mexTokenChartsService.getTokenPricesDayResolutionRaw('TOKEN-123456', '1683561648'); @@ -106,7 +106,7 @@ describe('MexTokenChartsService', () => { it('should return an empty array when no data is available', async () => { jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue({}); - jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true); + jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true); const result = await mexTokenChartsService.getTokenPricesDayResolutionRaw('TOKEN-123456', '1683561648'); expect(result).toEqual([]);