@zeniai/client-epic-state 5.1.88-beta0UT → 5.1.88-beta1UT

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.
@@ -333,12 +333,11 @@ const isTenantTreasuryEnabled = (tenant) => {
333
333
  exports.isTenantTreasuryEnabled = isTenantTreasuryEnabled;
334
334
  const DEFAULT_RECEIPTS_EMAIL = 'receipts@zeni.ai';
335
335
  function getReceiptsEmail(tenantState, tenantId) {
336
- if (tenantId == null) {
337
- return DEFAULT_RECEIPTS_EMAIL;
338
- }
339
- const tenant = tenantState.tenantsById[tenantId];
340
- if (tenant?.receiptsEmail != null && tenant.receiptsEmail !== '') {
341
- return tenant.receiptsEmail;
342
- }
343
- return DEFAULT_RECEIPTS_EMAIL;
336
+ const receiptsEmail = tenantId != null
337
+ ? tenantState.tenantsById[tenantId]?.receiptsEmail
338
+ : undefined;
339
+ // API can send empty string; treat it as "not configured"
340
+ return receiptsEmail != null && receiptsEmail !== ''
341
+ ? receiptsEmail
342
+ : DEFAULT_RECEIPTS_EMAIL;
344
343
  }
@@ -310,12 +310,11 @@ export const isTenantTreasuryEnabled = (tenant) => {
310
310
  };
311
311
  const DEFAULT_RECEIPTS_EMAIL = 'receipts@zeni.ai';
312
312
  export function getReceiptsEmail(tenantState, tenantId) {
313
- if (tenantId == null) {
314
- return DEFAULT_RECEIPTS_EMAIL;
315
- }
316
- const tenant = tenantState.tenantsById[tenantId];
317
- if (tenant?.receiptsEmail != null && tenant.receiptsEmail !== '') {
318
- return tenant.receiptsEmail;
319
- }
320
- return DEFAULT_RECEIPTS_EMAIL;
313
+ const receiptsEmail = tenantId != null
314
+ ? tenantState.tenantsById[tenantId]?.receiptsEmail
315
+ : undefined;
316
+ // API can send empty string; treat it as "not configured"
317
+ return receiptsEmail != null && receiptsEmail !== ''
318
+ ? receiptsEmail
319
+ : DEFAULT_RECEIPTS_EMAIL;
321
320
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.88-beta0UT",
3
+ "version": "5.1.88-beta1UT",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",