@canton-network/core-ledger-client 0.25.0 → 0.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3370,18 +3370,11 @@ var LedgerClient = class {
3370
3370
  };
3371
3371
  this.logger.info(options, "active contract query options");
3372
3372
  if (options?.filterByParty && options.parties && options.parties.length > 0) {
3373
- if (options?.templateIds && !options?.interfaceIds) {
3374
- for (const party of options.parties) {
3375
- filter.filter.filtersByParty[party] = {
3376
- cumulative: options.templateIds ? buildTemplateFilter(options.templateIds) : []
3377
- };
3378
- }
3379
- } else if (options?.interfaceIds && !options?.templateIds) {
3380
- for (const party of options.parties) {
3381
- filter.filter.filtersByParty[party] = {
3382
- cumulative: options.interfaceIds ? buildInterfaceFilter(options.interfaceIds) : []
3383
- };
3384
- }
3373
+ const cumulativeFilter = options?.templateIds && !options?.interfaceIds ? buildTemplateFilter(options.templateIds) : options?.interfaceIds && !options?.templateIds ? buildInterfaceFilter(options.interfaceIds) : [];
3374
+ for (const party of options.parties) {
3375
+ filter.filter.filtersByParty[party] = {
3376
+ cumulative: cumulativeFilter
3377
+ };
3385
3378
  }
3386
3379
  } else if (options?.templateIds) {
3387
3380
  filter.filter.filtersForAnyParty = {