@zeniai/client-epic-state 4.12.81 → 4.12.82

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.
@@ -15,11 +15,15 @@ const resendOtpEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators
15
15
  const resendOtpActions = [];
16
16
  const { otpChallenge, twoFASource } = action.payload;
17
17
  const tenantState = state$.value.tenantState;
18
+ const companyState = state$.value.companyState;
18
19
  const { currentTenantId } = tenantState;
19
- const productSettings = currentTenantId != null
20
- ? (_a = tenantState.tenantsById[currentTenantId]) === null || _a === void 0 ? void 0 : _a.productSettings
20
+ const companyId = currentTenantId != null
21
+ ? (_a = tenantState.tenantsById[currentTenantId]) === null || _a === void 0 ? void 0 : _a.companyId
21
22
  : undefined;
22
- const isCardsEnabled = productSettings != null ? productSettings.isCardsEnabled : false;
23
+ const isCardsEnabled = companyId != null
24
+ ? companyState.companiesById[companyId].companyChargeCardInfo
25
+ .isChargeCardEnabled
26
+ : false;
23
27
  const payload = {
24
28
  otp_challenge: otpChallenge,
25
29
  is_for_charge_cards: twoFASource === 'ChargeCard' ||
@@ -15,11 +15,15 @@ const sendOtpEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1
15
15
  const sendOtpActions = [];
16
16
  const { phoneNumber, twoFASource } = action.payload;
17
17
  const tenantState = state$.value.tenantState;
18
+ const companyState = state$.value.companyState;
18
19
  const { currentTenantId } = tenantState;
19
- const productSettings = currentTenantId != null
20
- ? (_a = tenantState.tenantsById[currentTenantId]) === null || _a === void 0 ? void 0 : _a.productSettings
20
+ const companyId = currentTenantId != null
21
+ ? (_a = tenantState.tenantsById[currentTenantId]) === null || _a === void 0 ? void 0 : _a.companyId
21
22
  : undefined;
22
- const isCardsEnabled = productSettings != null ? productSettings.isCardsEnabled : false;
23
+ const isCardsEnabled = companyId != null
24
+ ? companyState.companiesById[companyId].companyChargeCardInfo
25
+ .isChargeCardEnabled
26
+ : false;
23
27
  const queryPayload = {
24
28
  channel_type: 'phone',
25
29
  channel_info: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.12.81",
3
+ "version": "4.12.82",
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
  "types": "lib/index.d.ts",