@zeniai/client-epic-state 4.8.21 → 4.8.23
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,14 +51,23 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, billId)
|
|
|
51
51
|
let bankAccountList = [];
|
|
52
52
|
let paymentInstrumentList = [];
|
|
53
53
|
let contactDetails = [];
|
|
54
|
-
const primaryPaymentAccount = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, (transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.
|
|
54
|
+
const primaryPaymentAccount = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, (transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.billAccountType) ===
|
|
55
|
+
'paymentAccount' &&
|
|
56
|
+
(transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.billAccountId) != null
|
|
55
57
|
? /*
|
|
56
58
|
for extsing transaction since we are not calling payment accounts
|
|
57
59
|
we need to pick payment ids from billPayInfo object
|
|
58
60
|
*/
|
|
59
61
|
[transaction.billPayInfo.fromAccount.billAccountId]
|
|
60
62
|
: setupViewState.accountDetails.paymentAccountIds);
|
|
63
|
+
const fromDepositAccount = (transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.billAccountType) === 'depositAccount' &&
|
|
64
|
+
(transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.billAccountId) != null
|
|
65
|
+
? (0, depositAccountSelector_1.getDepositAccountByDepositAccountId)(depositAccountState, transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.billAccountId)
|
|
66
|
+
: undefined;
|
|
61
67
|
const allDepositAccounts = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState).depositAccounts;
|
|
68
|
+
if (allDepositAccounts.length === 0 && fromDepositAccount != null) {
|
|
69
|
+
allDepositAccounts.push(fromDepositAccount);
|
|
70
|
+
}
|
|
62
71
|
const withdrawFromList = (0, transferDetailSelector_1.getTransferMoneyParties)(allDepositAccounts, primaryPaymentAccount);
|
|
63
72
|
let previousBills = {
|
|
64
73
|
bills: [],
|
|
@@ -44,7 +44,7 @@ const toNonExistingRecommendationGlobalMerchantBasePayload = (globalMerchant) =>
|
|
|
44
44
|
};
|
|
45
45
|
exports.toNonExistingRecommendationGlobalMerchantBasePayload = toNonExistingRecommendationGlobalMerchantBasePayload;
|
|
46
46
|
const toVendorReviewViewRecommendationPayload = (recommendations, nonExistingRecommendations) => {
|
|
47
|
-
var _a, _b;
|
|
47
|
+
var _a, _b, _c, _d;
|
|
48
48
|
const recommendationsPayload = [];
|
|
49
49
|
recommendations.map((recommendation, index) => {
|
|
50
50
|
const recommendationEntities = [];
|
|
@@ -72,8 +72,8 @@ const toVendorReviewViewRecommendationPayload = (recommendations, nonExistingRec
|
|
|
72
72
|
const allRecommendations = [
|
|
73
73
|
{
|
|
74
74
|
global_merchants: [
|
|
75
|
-
...(_a = recommendationsPayload[0]) === null || _a === void 0 ? void 0 : _a.global_merchants,
|
|
76
|
-
...(
|
|
75
|
+
...((_b = (_a = recommendationsPayload[0]) === null || _a === void 0 ? void 0 : _a.global_merchants) !== null && _b !== void 0 ? _b : []),
|
|
76
|
+
...((_d = (_c = nonExistingRecommendationsPayload[0]) === null || _c === void 0 ? void 0 : _c.global_merchants) !== null && _d !== void 0 ? _d : []),
|
|
77
77
|
],
|
|
78
78
|
},
|
|
79
79
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.23",
|
|
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",
|