@zeniai/client-epic-state 4.12.29 → 4.12.31

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.
@@ -51,6 +51,7 @@ export interface TenantMerchantPayload {
51
51
  merchant_type?: string | null;
52
52
  logo: URLPayload | null;
53
53
  last_updated_merchant_name_by_user: UserBasePayload | null;
54
+ website_url?: string | null;
54
55
  }
55
56
  /**
56
57
  * helpers
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toTenantMerchant = exports.toGlobalMerchant = exports.toGlobalMerchantBase = exports.toGlobalMerchantBasePayload = void 0;
4
4
  const globalMerchantAutoCompleteViewState_1 = require("../../view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewState");
5
- const zeniUrl_1 = require("../../zeniUrl");
6
5
  const zeniDayJS_1 = require("../../zeniDayJS");
7
6
  const viewAndReportPayloadv2_1 = require("../../commonPayloadTypes/v2/viewAndReportPayloadv2");
7
+ const zeniUrl_1 = require("../../zeniUrl");
8
8
  /**
9
9
  * helpers
10
10
  */
@@ -102,6 +102,9 @@ const toTenantMerchant = (tenantMerchantPayload) => {
102
102
  lastUpdatedMerchantNameByUserId: (_c = tenantMerchantPayload.last_updated_merchant_name_by_user) === null || _c === void 0 ? void 0 : _c.user_id,
103
103
  accountName: tenantMerchantPayload.account_name,
104
104
  className: tenantMerchantPayload.accounting_class_name,
105
+ websiteUrl: tenantMerchantPayload.website_url != null
106
+ ? (0, zeniUrl_1.toZeniUrlWithoutBaseURL)(tenantMerchantPayload.website_url)
107
+ : undefined,
105
108
  };
106
109
  };
107
110
  exports.toTenantMerchant = toTenantMerchant;
@@ -53,6 +53,7 @@ export interface TenantMerchant {
53
53
  className: string;
54
54
  logo?: ZeniUrl;
55
55
  lastUpdatedMerchantNameByUserId?: ID;
56
+ websiteUrl?: ZeniUrl;
56
57
  }
57
58
  export interface GlobalMerchantState {
58
59
  globalMerchantsById: Record<ID, GlobalMerchant>;
@@ -632,7 +632,7 @@ const getDefaultWithdrawFromAccount = (state, depositAccounts, companyId, lastSe
632
632
  else {
633
633
  // User paid with Zeni account previously
634
634
  if (depositAccounts.length === 1) {
635
- defaultAccount = primaryAccount;
635
+ defaultAccount = lastSelectedFromAccount;
636
636
  }
637
637
  else {
638
638
  if ((primaryAccount === null || primaryAccount === void 0 ? void 0 : primaryAccount.accountType) === 'depositAccount') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.12.29",
3
+ "version": "4.12.31",
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",