@zeniai/client-epic-state 4.7.76 → 4.7.78
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/lib/entity/paymentAccount/paymentAccountSelector.js +2 -2
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +8 -0
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -0
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getPaymentAccountsByBankAccountIds = exports.getPaymentAccountByBankAccountId = exports.getPaymentAccountByPaymentAccountId = exports.getPaymentAccountsByPaymentAccountIds = void 0;
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
-
const
|
|
8
|
+
const values_1 = __importDefault(require("lodash/values"));
|
|
9
9
|
function getPaymentAccountsByPaymentAccountIds(paymentAccountState, paymentAccountIds) {
|
|
10
10
|
const paymentAccounts = paymentAccountIds
|
|
11
11
|
.map((paymentAccountId) => getPaymentAccountByPaymentAccountId(paymentAccountState, paymentAccountId))
|
|
@@ -18,7 +18,7 @@ function getPaymentAccountByPaymentAccountId(paymentAccountState, PaymentAccount
|
|
|
18
18
|
}
|
|
19
19
|
exports.getPaymentAccountByPaymentAccountId = getPaymentAccountByPaymentAccountId;
|
|
20
20
|
function getPaymentAccountByBankAccountId(paymentAccountState, bankAccountId) {
|
|
21
|
-
const allPaymentAccounts = (0,
|
|
21
|
+
const allPaymentAccounts = (0, values_1.default)(paymentAccountState.paymentAccountByID);
|
|
22
22
|
return allPaymentAccounts.find((account) => account.bankAccountId === bankAccountId);
|
|
23
23
|
}
|
|
24
24
|
exports.getPaymentAccountByBankAccountId = getPaymentAccountByBankAccountId;
|
|
@@ -9,6 +9,7 @@ exports.initialState = {
|
|
|
9
9
|
methodById: {},
|
|
10
10
|
vendor: {
|
|
11
11
|
supportedCountries: [],
|
|
12
|
+
localCurrencySupportedCountries: [],
|
|
12
13
|
supportedCurrencies: {},
|
|
13
14
|
currencyListByCountryId: {},
|
|
14
15
|
},
|
|
@@ -72,6 +73,13 @@ const billPayConfig = (0, toolkit_1.createSlice)({
|
|
|
72
73
|
countryName: country.country_name,
|
|
73
74
|
};
|
|
74
75
|
});
|
|
76
|
+
draft.vendor.localCurrencySupportedCountries =
|
|
77
|
+
vendor.local_currency_supported_countries.map((country) => {
|
|
78
|
+
return {
|
|
79
|
+
countryCode: country.country_code,
|
|
80
|
+
countryName: country.country_name,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
75
83
|
const countryCodes = Object.keys(vendor.supported_currencies.by_country);
|
|
76
84
|
countryCodes.forEach((countryCode) => {
|
|
77
85
|
const currencyPayload = vendor.supported_currencies.by_country[countryCode];
|
|
@@ -13,6 +13,7 @@ export interface BillPayConfigState extends FetchedState {
|
|
|
13
13
|
methodById: Record<string, BillPayConfig>;
|
|
14
14
|
vendor: {
|
|
15
15
|
supportedCountries: Country[];
|
|
16
|
+
localCurrencySupportedCountries: Country[];
|
|
16
17
|
supportedCurrencies: VendorCurrencyConfig;
|
|
17
18
|
currencyListByCountryId: Record<ID, VendorCurrency[]>;
|
|
18
19
|
};
|
|
@@ -27,7 +27,7 @@ const getInternationalWireView = (state, vendorType, billId) => {
|
|
|
27
27
|
dynamicFormFields =
|
|
28
28
|
dynamicFormDetails.supportedDynamicFormByTypes[localData.accountType.type];
|
|
29
29
|
}
|
|
30
|
-
const supportedCountries = billPayConfigState.vendor.
|
|
30
|
+
const supportedCountries = billPayConfigState.vendor.localCurrencySupportedCountries;
|
|
31
31
|
const selectedCountry = localData === null || localData === void 0 ? void 0 : localData.countryCode;
|
|
32
32
|
const supportedCurrencies = selectedCountry != null
|
|
33
33
|
? billPayConfigState.vendor.currencyListByCountryId[selectedCountry]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.78",
|
|
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",
|