@zeniai/client-epic-state 4.8.14 → 4.8.16
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.
|
@@ -417,8 +417,14 @@ function getPaymentSection(state, withdrawFromList, updatedPaymentSection) {
|
|
|
417
417
|
? withdrawFromList[0]
|
|
418
418
|
: undefined;
|
|
419
419
|
const withdrawFromAccountingName = undefined;
|
|
420
|
+
const availablePaymentOptions = state.billPayConfigState.fetchState === 'Completed'
|
|
421
|
+
? (0, exports.getBillPayConfigList)(state.billPayConfigState).filter((option) => { var _a; return option.method.includes((_a = withdrawFrom === null || withdrawFrom === void 0 ? void 0 : withdrawFrom.accType) !== null && _a !== void 0 ? _a : ''); })
|
|
422
|
+
: [];
|
|
423
|
+
const isSinglePaymentTypeOption = availablePaymentOptions.length === 1;
|
|
420
424
|
return {
|
|
421
|
-
paymentType:
|
|
425
|
+
paymentType: isSinglePaymentTypeOption
|
|
426
|
+
? availablePaymentOptions[0]
|
|
427
|
+
: (_a = updatedPaymentSection.paymentType) !== null && _a !== void 0 ? _a : undefined,
|
|
422
428
|
paymentDate: (_b = updatedPaymentSection === null || updatedPaymentSection === void 0 ? void 0 : updatedPaymentSection.paymentDate) !== null && _b !== void 0 ? _b : undefined,
|
|
423
429
|
withdrawFrom: withdrawFrom,
|
|
424
430
|
withdrawFromAccountingName,
|
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.16",
|
|
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",
|