diff --git a/src/common/indexer/elastic/elastic.indexer.helper.ts b/src/common/indexer/elastic/elastic.indexer.helper.ts index 6923cddc0..ab926deb1 100644 --- a/src/common/indexer/elastic/elastic.indexer.helper.ts +++ b/src/common/indexer/elastic/elastic.indexer.helper.ts @@ -709,11 +709,7 @@ export class ElasticIndexerHelper { } if (filter.isSmartContract !== undefined) { - if (filter.isSmartContract) { - elasticQuery = elasticQuery.withMustExistCondition('currentOwner'); - } else { - elasticQuery = elasticQuery.withMustNotExistCondition('currentOwner'); - } + elasticQuery = this.buildAccountTypeFilter(elasticQuery, filter.isSmartContract ? AccountType.SMART_CONTRACT : AccountType.WALLET); } if (filter.name) {