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

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.cjs CHANGED
@@ -3377,18 +3377,11 @@ var LedgerClient = class {
3377
3377
  };
3378
3378
  this.logger.info(options, "active contract query options");
3379
3379
  if (options?.filterByParty && options.parties && options.parties.length > 0) {
3380
- if (options?.templateIds && !options?.interfaceIds) {
3381
- for (const party of options.parties) {
3382
- filter.filter.filtersByParty[party] = {
3383
- cumulative: options.templateIds ? buildTemplateFilter(options.templateIds) : []
3384
- };
3385
- }
3386
- } else if (options?.interfaceIds && !options?.templateIds) {
3387
- for (const party of options.parties) {
3388
- filter.filter.filtersByParty[party] = {
3389
- cumulative: options.interfaceIds ? buildInterfaceFilter(options.interfaceIds) : []
3390
- };
3391
- }
3380
+ const cumulativeFilter = options?.templateIds && !options?.interfaceIds ? buildTemplateFilter(options.templateIds) : options?.interfaceIds && !options?.templateIds ? buildInterfaceFilter(options.interfaceIds) : [];
3381
+ for (const party of options.parties) {
3382
+ filter.filter.filtersByParty[party] = {
3383
+ cumulative: cumulativeFilter
3384
+ };
3392
3385
  }
3393
3386
  } else if (options?.templateIds) {
3394
3387
  filter.filter.filtersForAnyParty = {