@zeniai/client-epic-state 4.8.39 → 4.8.41
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/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts +1 -0
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js +6 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.d.ts +1 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +2 -0
- package/package.json +1 -1
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export interface PaymentAccountListSelectorView extends SelectorView {
|
|
|
7
7
|
unlinkingAccountStatus: Record<ID, FetchStateAndError>;
|
|
8
8
|
}
|
|
9
9
|
export declare const getAllPaymentAccounts: (paymentAccountState: PaymentAccountState, paymentAccountListState: PaymentAccountListState) => PaymentAccountListSelectorView;
|
|
10
|
+
export declare const getPrimaryPaymentAccount: (paymentAccountState: PaymentAccountState, paymentAccountListState: PaymentAccountListState) => PaymentAccount | undefined;
|
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAllPaymentAccounts = void 0;
|
|
3
|
+
exports.getPrimaryPaymentAccount = exports.getAllPaymentAccounts = void 0;
|
|
4
4
|
const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
|
|
5
5
|
const getAllPaymentAccounts = (paymentAccountState, paymentAccountListState) => {
|
|
6
6
|
return {
|
|
@@ -12,3 +12,8 @@ const getAllPaymentAccounts = (paymentAccountState, paymentAccountListState) =>
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
exports.getAllPaymentAccounts = getAllPaymentAccounts;
|
|
15
|
+
const getPrimaryPaymentAccount = (paymentAccountState, paymentAccountListState) => {
|
|
16
|
+
const paymentAccounts = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, paymentAccountListState.paymentAccountIds);
|
|
17
|
+
return paymentAccounts.find((account) => account.isPrimaryForBillPay === true);
|
|
18
|
+
};
|
|
19
|
+
exports.getPrimaryPaymentAccount = getPrimaryPaymentAccount;
|
|
@@ -8,6 +8,7 @@ export interface TransferDetailSelectorView extends SelectorView {
|
|
|
8
8
|
transferDetailLocalData: TransferDetailLocalData;
|
|
9
9
|
transferMoneyParties: TransferMoneyParty[];
|
|
10
10
|
transferMoneyPartiesFetchState: FetchState;
|
|
11
|
+
primaryPaymentAccount?: PaymentAccount;
|
|
11
12
|
}
|
|
12
13
|
export declare const getTransferDetail: (state: RootState) => TransferDetailSelectorView;
|
|
13
14
|
export declare const getTransferMoneyParties: (depositAccounts: DepositAccount[], paymentAccounts: PaymentAccount[]) => TransferMoneyParty[];
|
|
@@ -19,6 +19,7 @@ const getTransferDetail = (state) => {
|
|
|
19
19
|
paymentAccountsView.fetchState === 'Completed') {
|
|
20
20
|
transferParties = (0, exports.getTransferMoneyParties)(depositAccountsView.depositAccounts, paymentAccountsView.paymentAccounts);
|
|
21
21
|
}
|
|
22
|
+
const primaryPaymentAccount = (0, paymentAccountListSelector_1.getPrimaryPaymentAccount)(paymentAccountState, paymentAccountListState);
|
|
22
23
|
return {
|
|
23
24
|
transferDetailLocalData: localData,
|
|
24
25
|
fetchState,
|
|
@@ -26,6 +27,7 @@ const getTransferDetail = (state) => {
|
|
|
26
27
|
transferMoneyParties: transferParties,
|
|
27
28
|
version: 0,
|
|
28
29
|
transferMoneyPartiesFetchState,
|
|
30
|
+
primaryPaymentAccount,
|
|
29
31
|
};
|
|
30
32
|
};
|
|
31
33
|
exports.getTransferDetail = getTransferDetail;
|
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.41",
|
|
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",
|