@tap-payments/auth-jsconnect 2.8.55-beta → 2.8.55-development
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/build/@types/app.d.ts +1 -0
- package/build/@types/form.d.ts +1 -0
- package/build/@types/redux.d.ts +1 -0
- package/build/api/entity.d.ts +2 -2
- package/build/api/entity.js +12 -4
- package/build/api/index.d.ts +2 -2
- package/build/constants/api.d.ts +0 -1
- package/build/constants/api.js +0 -2
- package/build/constants/app.d.ts +0 -2
- package/build/constants/app.js +0 -2
- package/build/features/app/bank/bankStore.d.ts +13 -18
- package/build/features/app/bank/bankStore.js +184 -165
- package/build/features/app/board/boardStore.js +52 -30
- package/build/features/app/brand/brandStore.d.ts +16 -33
- package/build/features/app/brand/brandStore.js +239 -242
- package/build/features/app/business/businessStore.d.ts +0 -5
- package/build/features/app/business/businessStore.js +76 -87
- package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
- package/build/features/app/connectExpress/connectExpressStore.js +110 -52
- package/build/features/app/entity/entityStore.d.ts +20 -36
- package/build/features/app/entity/entityStore.js +196 -246
- package/build/features/app/individual/individualStore.d.ts +22 -38
- package/build/features/app/individual/individualStore.js +263 -266
- package/build/features/app/password/passwordStore.d.ts +40 -23
- package/build/features/app/password/passwordStore.js +226 -233
- package/build/features/app/tax/taxStore.d.ts +13 -7
- package/build/features/app/tax/taxStore.js +168 -147
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +13 -1
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/bank/Bank.d.ts +1 -0
- package/build/features/bank/Bank.js +7 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +5 -5
- package/build/features/board/Board.js +8 -4
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -4
- package/build/features/brand/Brand.d.ts +1 -0
- package/build/features/brand/Brand.js +7 -4
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +23 -5
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +23 -7
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/brand/screens/Verify/Verify.js +1 -1
- package/build/features/business/Business.js +9 -4
- package/build/features/business/screens/Activities/Activities.js +12 -3
- package/build/features/business/screens/BusinessType/BusinessType.js +10 -2
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +12 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +6 -3
- package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/Verify.js +13 -3
- package/build/features/connect/Connect.js +3 -2
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +9 -2
- package/build/features/connect/screens/CivilID/CivilID.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +3 -1
- package/build/features/connect/screens/Individual/Individual.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +11 -8
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +2 -1
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +5 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +9 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +6 -1
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +10 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/connectExpress/screens/CivilID/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -1
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/Mobile/Mobile.js +9 -2
- package/build/features/connectExpress/screens/NID/NID.js +1 -1
- package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/Entity.d.ts +1 -0
- package/build/features/entity/Entity.js +7 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
- package/build/features/entity/screens/EntityName/EntityName.js +32 -15
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/Verify/Verify.js +1 -1
- package/build/features/featuresScreens.js +67 -7
- package/build/features/individual/Individual.d.ts +1 -0
- package/build/features/individual/Individual.js +7 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +54 -14
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +14 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +3 -2
- package/build/features/individual/screens/IndividualList/Email.js +3 -2
- package/build/features/individual/screens/IndividualList/IndividualList.js +18 -5
- package/build/features/individual/screens/IndividualList/UserList.js +13 -9
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +4 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +76 -20
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +1 -1
- package/build/features/password/Password.d.ts +1 -0
- package/build/features/password/Password.js +75 -28
- package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -4
- package/build/features/password/screens/OTP/OTP.js +1 -1
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +5 -5
- package/build/features/shared/Button/FlowsButtons.js +13 -3
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -0
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +5 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -3
- package/build/features/signIn/SignIn.js +12 -3
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.d.ts +1 -0
- package/build/features/tax/Tax.js +7 -4
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +5 -5
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useVerifyToken.d.ts +5 -2
- package/build/hooks/useVerifyToken.js +10 -5
- package/build/utils/common.js +4 -4
- package/build/utils/locale.js +2 -1
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +34 -5
- package/package.json +2 -2
|
@@ -51,14 +51,14 @@ import API from '../../../api';
|
|
|
51
51
|
import { DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
52
52
|
import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { BANK_STEP_NAMES } from '../../../constants';
|
|
54
|
-
import { hasNoneEditableValue, isStringHasOneAsterisk, retrieveIndividualData, sleep } from '../../../utils';
|
|
54
|
+
import { hasNoneEditableValue, isStringHasOneAsterisk, retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_a, thunkApi) {
|
|
56
56
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
57
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var payload, data,
|
|
59
|
-
var _e, _f, _g, _h
|
|
60
|
-
return __generator(this, function (
|
|
61
|
-
switch (
|
|
58
|
+
var payload, data, bankData, _b, config, country_code, step_name, bank_account_id, wallet_id, boardId, publicKey, data_1;
|
|
59
|
+
var _c, _d, _e, _f, _g, _h;
|
|
60
|
+
return __generator(this, function (_j) {
|
|
61
|
+
switch (_j.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
payload = __assign({ service_name: 'tap_email', verify_token: token }, (isInternally && {
|
|
64
64
|
notification: {
|
|
@@ -67,68 +67,51 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_
|
|
|
67
67
|
}));
|
|
68
68
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
69
69
|
case 1:
|
|
70
|
-
data = (
|
|
71
|
-
|
|
72
|
-
if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
70
|
+
data = (_j.sent()).data;
|
|
71
|
+
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
73
72
|
throw new Error(data.errors[0].description);
|
|
74
|
-
|
|
73
|
+
bankData = undefined;
|
|
74
|
+
_b = data || {}, config = _b.config, country_code = _b.country_code, step_name = _b.step_name, bank_account_id = _b.bank_account_id, wallet_id = _b.wallet_id, boardId = _b.id;
|
|
75
75
|
publicKey = config === null || config === void 0 ? void 0 : config.public_key;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
if (country_code)
|
|
77
|
+
thunkApi.dispatch(handleSetCountryByIso2(country_code));
|
|
78
|
+
if (publicKey)
|
|
78
79
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
80
|
+
if (isInternally)
|
|
81
|
+
data.step_name = BANK_STEP_NAMES.BANK_INFO;
|
|
82
|
+
if (!(step_name === BANK_STEP_NAMES.PHONE_AUTH)) return [3, 2];
|
|
83
|
+
thunkApi.dispatch(handleCurrentActiveScreen('BANK_VERIFY_STEP'));
|
|
84
|
+
return [3, 7];
|
|
85
85
|
case 2:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
if (!(step_name === BANK_STEP_NAMES.BANK_INFO)) return [3, 7];
|
|
87
|
+
if (!(!wallet_id || !country_code)) return [3, 4];
|
|
88
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
89
|
+
case 3:
|
|
90
|
+
data_1 = _j.sent();
|
|
91
|
+
if (!country_code && ((_d = data_1 === null || data_1 === void 0 ? void 0 : data_1.entity) === null || _d === void 0 ? void 0 : _d.country))
|
|
92
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_1.entity.country));
|
|
93
|
+
if (!((_h = (_g = (_f = (_e = data_1 === null || data_1 === void 0 ? void 0 : data_1.business) === null || _e === void 0 ? void 0 : _e.entity) === null || _f === void 0 ? void 0 : _f.merchant) === null || _g === void 0 ? void 0 : _g.wallet) === null || _h === void 0 ? void 0 : _h.id))
|
|
94
|
+
throw new Error('wallet_id_missing');
|
|
95
|
+
if (data_1 === null || data_1 === void 0 ? void 0 : data_1.bank_account)
|
|
96
|
+
bankData = data_1.bank_account;
|
|
97
|
+
return [3, 6];
|
|
89
98
|
case 4:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
serviceCallBack = function () { return API.individualService.retrieveIndividual(id_1, type_1); };
|
|
93
|
-
return [4, retrieveIndividualData(type_1, boardData, serviceCallBack)];
|
|
99
|
+
if (!bank_account_id) return [3, 6];
|
|
100
|
+
return [4, API.entityService.retrieveBankAccount(bank_account_id)];
|
|
94
101
|
case 5:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
individualData = individualRes;
|
|
98
|
-
_k.label = 6;
|
|
102
|
+
bankData = _j.sent();
|
|
103
|
+
_j.label = 6;
|
|
99
104
|
case 6:
|
|
100
|
-
if (!countryIso2 && ((_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.country)) {
|
|
101
|
-
countryIso2 = boardData.entity.country;
|
|
102
|
-
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
103
|
-
}
|
|
104
105
|
if (isInternally)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
thunkApi.dispatch(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
return [2, {
|
|
116
|
-
data: data,
|
|
117
|
-
individualData: individualData,
|
|
118
|
-
boardResponse: {
|
|
119
|
-
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
120
|
-
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
121
|
-
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
122
|
-
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
123
|
-
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
124
|
-
name: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.names,
|
|
125
|
-
contact: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.contact,
|
|
126
|
-
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
127
|
-
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
128
|
-
notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification
|
|
129
|
-
},
|
|
130
|
-
token: token
|
|
131
|
-
}];
|
|
106
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
107
|
+
else
|
|
108
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
109
|
+
_j.label = 7;
|
|
110
|
+
case 7: return [2, {
|
|
111
|
+
data: data,
|
|
112
|
+
bankData: bankData,
|
|
113
|
+
token: token
|
|
114
|
+
}];
|
|
132
115
|
}
|
|
133
116
|
});
|
|
134
117
|
});
|
|
@@ -151,75 +134,118 @@ export var resendOTP = createAsyncThunk('resendOTPBank', function (params, thunk
|
|
|
151
134
|
});
|
|
152
135
|
}); });
|
|
153
136
|
export var verifyBankLeadOTP = createAsyncThunk('verifyBankLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
154
|
-
var _a, bank, settings, responseBody, payload, data, publicKey;
|
|
155
|
-
var
|
|
156
|
-
return __generator(this, function (
|
|
157
|
-
switch (
|
|
137
|
+
var _a, bank, settings, responseBody, payload, data, countryIso2, publicKey, _b, bank_account_id, wallet_id, boardId, bankData, data_2;
|
|
138
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
139
|
+
return __generator(this, function (_o) {
|
|
140
|
+
switch (_o.label) {
|
|
158
141
|
case 0:
|
|
159
142
|
_a = thunkApi.getState(), bank = _a.bank, settings = _a.settings;
|
|
160
143
|
responseBody = bank.data.verify.responseBody;
|
|
161
144
|
payload = {
|
|
162
145
|
data: params.otp,
|
|
163
|
-
service_name: (
|
|
146
|
+
service_name: (_c = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _c === void 0 ? void 0 : _c.service_name,
|
|
164
147
|
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
165
148
|
step_name: BANK_STEP_NAMES.PHONE_AUTH,
|
|
166
149
|
encryption_contract: ['data']
|
|
167
150
|
};
|
|
168
151
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
169
152
|
case 1:
|
|
170
|
-
data = (
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
153
|
+
data = (_o.sent()).data;
|
|
154
|
+
if ((_d = data.errors) === null || _d === void 0 ? void 0 : _d.length)
|
|
155
|
+
throw new Error(data.errors[0].description);
|
|
156
|
+
countryIso2 = (data === null || data === void 0 ? void 0 : data.country_code) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.country_code);
|
|
157
|
+
publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
|
|
158
|
+
if (countryIso2)
|
|
159
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
160
|
+
if (publicKey)
|
|
161
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
162
|
+
_b = data || {}, bank_account_id = _b.bank_account_id, wallet_id = _b.wallet_id, boardId = _b.id;
|
|
163
|
+
bankData = undefined;
|
|
164
|
+
if (!(!wallet_id || !countryIso2)) return [3, 3];
|
|
165
|
+
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
166
|
+
case 2:
|
|
167
|
+
data_2 = _o.sent();
|
|
168
|
+
if (!countryIso2 && ((_f = data_2 === null || data_2 === void 0 ? void 0 : data_2.entity) === null || _f === void 0 ? void 0 : _f.country))
|
|
169
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_2.entity.country));
|
|
170
|
+
if (!((_k = (_j = (_h = (_g = data_2 === null || data_2 === void 0 ? void 0 : data_2.business) === null || _g === void 0 ? void 0 : _g.entity) === null || _h === void 0 ? void 0 : _h.merchant) === null || _j === void 0 ? void 0 : _j.wallet) === null || _k === void 0 ? void 0 : _k.id))
|
|
171
|
+
throw new Error('wallet_id_missing');
|
|
172
|
+
if (data_2 === null || data_2 === void 0 ? void 0 : data_2.bank_account)
|
|
173
|
+
bankData = data_2.bank_account;
|
|
174
|
+
return [3, 5];
|
|
175
|
+
case 3:
|
|
176
|
+
if (!bank_account_id) return [3, 5];
|
|
177
|
+
return [4, API.entityService.retrieveBankAccount(bank_account_id)];
|
|
178
|
+
case 4:
|
|
179
|
+
bankData = _o.sent();
|
|
180
|
+
_o.label = 5;
|
|
181
|
+
case 5:
|
|
182
|
+
(_m = (_l = settings.data.appConfig).onStepCompleted) === null || _m === void 0 ? void 0 : _m.call(_l, settings.data.activeScreen.name, { otp: params.otp });
|
|
183
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
184
|
+
return [2, {
|
|
185
|
+
data: data,
|
|
186
|
+
bankData: bankData,
|
|
187
|
+
formData: params
|
|
188
|
+
}];
|
|
180
189
|
}
|
|
181
190
|
});
|
|
182
191
|
}); });
|
|
183
192
|
export var retrieveBoardStatus = createAsyncThunk('bank/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
184
|
-
var bank, board_id, data;
|
|
185
|
-
return __generator(this, function (
|
|
186
|
-
switch (
|
|
193
|
+
var bank, _a, board_id, board_info_id, recipient, _b, id, type, data;
|
|
194
|
+
return __generator(this, function (_c) {
|
|
195
|
+
switch (_c.label) {
|
|
187
196
|
case 0:
|
|
188
197
|
bank = thunkApi.getState().bank;
|
|
189
|
-
|
|
190
|
-
|
|
198
|
+
_a = bank.data.verify.responseBody || {}, board_id = _a.board_id, board_info_id = _a.board_info_id, recipient = _a.recipient;
|
|
199
|
+
if (!board_id || !board_info_id)
|
|
200
|
+
throw new Error('Internal server error');
|
|
201
|
+
_b = recipient || {}, id = _b.id, type = _b.type;
|
|
202
|
+
return [4, Promise.all([
|
|
203
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
204
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
205
|
+
])];
|
|
191
206
|
case 1:
|
|
192
|
-
data =
|
|
207
|
+
data = (_c.sent())[0];
|
|
193
208
|
thunkApi.dispatch(handlePrevScreenStep());
|
|
194
209
|
return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
|
|
195
210
|
}
|
|
196
211
|
});
|
|
197
212
|
}); });
|
|
198
|
-
export var retrieveBoardDetails = createAsyncThunk('bank/retrieveBoardDetails', function (
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
213
|
+
export var retrieveBoardDetails = createAsyncThunk('bank/retrieveBoardDetails', function (_a) {
|
|
214
|
+
var boardId = _a.boardId, id = _a.individualId, type = _a.individualType;
|
|
215
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
216
|
+
var data, individualData, boardData, serviceCallBack, _b, boardRes, individualRes;
|
|
217
|
+
var _c, _d, _e;
|
|
218
|
+
return __generator(this, function (_f) {
|
|
219
|
+
switch (_f.label) {
|
|
220
|
+
case 0: return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
221
|
+
case 1:
|
|
222
|
+
data = _f.sent();
|
|
223
|
+
individualData = data === null || data === void 0 ? void 0 : data.user;
|
|
224
|
+
boardData = data;
|
|
225
|
+
if (!(((_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.id) !== id)) return [3, 3];
|
|
226
|
+
serviceCallBack = function () { return API.individualService.retrieveIndividual(id, type); };
|
|
227
|
+
return [4, retrieveIndividualData(type, data, serviceCallBack)];
|
|
228
|
+
case 2:
|
|
229
|
+
_b = _f.sent(), boardRes = _b.boardRes, individualRes = _b.individualRes;
|
|
230
|
+
individualData = individualRes;
|
|
231
|
+
boardData = boardRes;
|
|
232
|
+
_f.label = 3;
|
|
233
|
+
case 3: return [2, __assign(__assign({}, boardData), { brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names, business: boardData === null || boardData === void 0 ? void 0 : boardData.business, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact, user: individualData })];
|
|
234
|
+
}
|
|
235
|
+
});
|
|
210
236
|
});
|
|
211
|
-
});
|
|
237
|
+
});
|
|
212
238
|
export var createBankAccount = createAsyncThunk('createBankAccount', function (_a, thunkApi) {
|
|
213
|
-
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
239
|
+
var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
|
|
214
240
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
215
|
-
var _b, settings, bank, iban, beneficiaryName, bankName, bankStatementId, confirmPolicy, _c, bank_account,
|
|
216
|
-
var _e, _f
|
|
217
|
-
return __generator(this, function (
|
|
218
|
-
switch (
|
|
241
|
+
var _b, settings, bank, iban, beneficiaryName, bankName, bankStatementId, confirmPolicy, _c, bank_account, wallet_id, recipient, _d, data_status, document, isIBANMasked, isIBANNonEditable, isBeneficiaryNameNonEditable, isBankNameNonEditable, isBankStatementIdNonEditable, isConfirmPolicyNonEditable, documentResponse, data, hasDocument, documentId, requestBody, documentBody;
|
|
242
|
+
var _e, _f;
|
|
243
|
+
return __generator(this, function (_g) {
|
|
244
|
+
switch (_g.label) {
|
|
219
245
|
case 0:
|
|
220
246
|
_b = thunkApi.getState(), settings = _b.settings, bank = _b.bank;
|
|
221
247
|
iban = formData.iban, beneficiaryName = formData.beneficiaryName, bankName = formData.bankName, bankStatementId = formData.bankStatementId, confirmPolicy = formData.confirmPolicy;
|
|
222
|
-
_c = bank.data.verify.responseBody || {}, bank_account = _c.bank_account,
|
|
248
|
+
_c = bank.data.verify.responseBody || {}, bank_account = _c.bank_account, wallet_id = _c.wallet_id, recipient = _c.recipient;
|
|
223
249
|
_d = bank_account || {}, data_status = _d.data_status, document = _d.document;
|
|
224
250
|
isIBANMasked = isStringHasOneAsterisk(iban);
|
|
225
251
|
isIBANNonEditable = hasNoneEditableValue(data_status, 'iban');
|
|
@@ -228,14 +254,16 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (_
|
|
|
228
254
|
isBankStatementIdNonEditable = hasNoneEditableValue(data_status, 'bank_statement_file_id');
|
|
229
255
|
isConfirmPolicyNonEditable = hasNoneEditableValue(data_status, 'is_acknowledged');
|
|
230
256
|
documentResponse = undefined;
|
|
231
|
-
|
|
257
|
+
data = bank_account || {};
|
|
258
|
+
hasDocument = !isBankStatementIdNonEditable && (bankStatementId || []).length > 0;
|
|
232
259
|
documentId = document === null || document === void 0 ? void 0 : document.id;
|
|
233
260
|
requestBody = {
|
|
234
|
-
wallet_id:
|
|
261
|
+
wallet_id: wallet_id,
|
|
235
262
|
bank_account: __assign(__assign({ iban: isIBANNonEditable || isIBANMasked ? undefined : iban, beneficiary_name: isBeneficiaryNameNonEditable ? undefined : beneficiaryName, bank_name: isBankNameNonEditable ? undefined : bankName }, (!isConfirmPolicyNonEditable && {
|
|
236
|
-
acknowledged_by:
|
|
263
|
+
acknowledged_by: recipient === null || recipient === void 0 ? void 0 : recipient.id,
|
|
237
264
|
is_acknowledged: confirmPolicy
|
|
238
|
-
})), (!
|
|
265
|
+
})), (!documentId &&
|
|
266
|
+
hasDocument && {
|
|
239
267
|
document: {
|
|
240
268
|
type: DocumentPurpose.BANK_STATEMENT,
|
|
241
269
|
files: bankStatementId || []
|
|
@@ -244,24 +272,25 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (_
|
|
|
244
272
|
step_name: BANK_STEP_NAMES.BANK_INFO,
|
|
245
273
|
encryption_contract: ['bank_account.iban', 'bank_account.beneficiary_name', 'bank_account.bank_name']
|
|
246
274
|
};
|
|
275
|
+
if (!(isDirty || (!documentId && hasDocument))) return [3, 2];
|
|
247
276
|
return [4, API.entityService.createBankAccount(requestBody)];
|
|
248
277
|
case 1:
|
|
249
|
-
data =
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
if (!(
|
|
278
|
+
data = _g.sent();
|
|
279
|
+
_g.label = 2;
|
|
280
|
+
case 2:
|
|
281
|
+
if (!(documentId && hasDocument)) return [3, 4];
|
|
253
282
|
documentBody = {
|
|
254
283
|
id: documentId,
|
|
255
284
|
files: bankStatementId || []
|
|
256
285
|
};
|
|
257
286
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
258
|
-
case 2:
|
|
259
|
-
documentResponse = _p.sent();
|
|
260
|
-
_p.label = 3;
|
|
261
287
|
case 3:
|
|
262
|
-
|
|
288
|
+
documentResponse = _g.sent();
|
|
289
|
+
_g.label = 4;
|
|
290
|
+
case 4:
|
|
291
|
+
data = __assign(__assign({}, data), { documentResponse: documentResponse });
|
|
263
292
|
thunkApi.dispatch(handleNextScreenStep());
|
|
264
|
-
(
|
|
293
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
|
|
265
294
|
return [2, { data: data, formData: originalFormData }];
|
|
266
295
|
}
|
|
267
296
|
});
|
|
@@ -288,40 +317,45 @@ export var checkIbanBank = createAsyncThunk('checkIbanBank', function (_a) {
|
|
|
288
317
|
});
|
|
289
318
|
});
|
|
290
319
|
export var updateBoardSuccess = createAsyncThunk('updateBoardBankSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
291
|
-
var _a, settings, bank,
|
|
292
|
-
var
|
|
293
|
-
return __generator(this, function (
|
|
294
|
-
switch (
|
|
320
|
+
var _a, settings, bank, _b, board_id, infoId, _c, showBoard, mode, payload, data, _d, id, type, boardInfoStatusData;
|
|
321
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
322
|
+
return __generator(this, function (_p) {
|
|
323
|
+
switch (_p.label) {
|
|
295
324
|
case 0:
|
|
296
325
|
_a = thunkApi.getState(), settings = _a.settings, bank = _a.bank;
|
|
297
|
-
|
|
298
|
-
_b = verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id;
|
|
326
|
+
_b = bank.data.verify.responseBody || {}, board_id = _b.board_id, infoId = _b.board_info_id;
|
|
299
327
|
_c = settings.data.appConfig, showBoard = _c.showBoard, mode = _c.mode;
|
|
300
|
-
if (!
|
|
328
|
+
if (!board_id)
|
|
301
329
|
return [2];
|
|
302
330
|
payload = {
|
|
303
331
|
lang: settings.data.language,
|
|
304
|
-
step_name: BANK_STEP_NAMES.BANK_SUCCESS
|
|
305
|
-
id: id
|
|
332
|
+
step_name: BANK_STEP_NAMES.BANK_SUCCESS
|
|
306
333
|
};
|
|
307
|
-
return [4, API.boardService.updateBoardInfo(__assign({ id:
|
|
334
|
+
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
308
335
|
case 1:
|
|
309
|
-
data =
|
|
336
|
+
data = _p.sent();
|
|
337
|
+
sendCustomEventToGTM({
|
|
338
|
+
event: 'Send Event',
|
|
339
|
+
event_category: 'Board Flows - Wallet',
|
|
340
|
+
event_action: 'Wallet Update Success Page',
|
|
341
|
+
event_label: settings.data.businessCountry.iso2
|
|
342
|
+
});
|
|
310
343
|
if (!showBoard && mode === 'content') {
|
|
311
|
-
(
|
|
312
|
-
(
|
|
313
|
-
return [2, {
|
|
344
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
345
|
+
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
346
|
+
return [2, { data: data }];
|
|
314
347
|
}
|
|
315
|
-
|
|
348
|
+
_d = ((_j = data === null || data === void 0 ? void 0 : data.notification) === null || _j === void 0 ? void 0 : _j.recipient) || {}, id = _d.id, type = _d.type;
|
|
349
|
+
return [4, Promise.all([
|
|
350
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
351
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type })).unwrap()
|
|
352
|
+
])];
|
|
316
353
|
case 2:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
_m.sent();
|
|
321
|
-
(_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, {});
|
|
322
|
-
(_l = (_k = settings.data.appConfig).onFlowCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, { data: data });
|
|
354
|
+
boardInfoStatusData = (_p.sent())[0];
|
|
355
|
+
(_l = (_k = settings.data.appConfig).onStepCompleted) === null || _l === void 0 ? void 0 : _l.call(_k, settings.data.activeScreen.name, {});
|
|
356
|
+
(_o = (_m = settings.data.appConfig).onFlowCompleted) === null || _o === void 0 ? void 0 : _o.call(_m, { data: data });
|
|
323
357
|
thunkApi.dispatch(handleNextScreenStep());
|
|
324
|
-
return [2, {
|
|
358
|
+
return [2, { data: data, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] }];
|
|
325
359
|
}
|
|
326
360
|
});
|
|
327
361
|
}); });
|
|
@@ -384,23 +418,17 @@ export var bankSlice = createSlice({
|
|
|
384
418
|
state.customLoading = true;
|
|
385
419
|
})
|
|
386
420
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
387
|
-
var _a;
|
|
388
421
|
state.error = null;
|
|
389
422
|
state.customLoading = false;
|
|
390
|
-
var
|
|
391
|
-
var
|
|
392
|
-
if (description) {
|
|
393
|
-
state.error = description;
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, individualData: individualData });
|
|
397
|
-
state.data.verify.token = token;
|
|
398
|
-
var _c = (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) || {}, bank_name = _c.bank_name, beneficiary_name = _c.beneficiary_name, iban = _c.iban, is_acknowledged = _c.is_acknowledged;
|
|
423
|
+
var _a = action.payload || {}, data = _a.data, token = _a.token, bank_account = _a.bankData;
|
|
424
|
+
var _b = bank_account || {}, bank_name = _b.bank_name, beneficiary_name = _b.beneficiary_name, iban = _b.iban, is_acknowledged = _b.is_acknowledged;
|
|
399
425
|
state.data.bankData.bankName = bank_name || '';
|
|
400
426
|
state.data.bankData.beneficiaryName = beneficiary_name || '';
|
|
401
427
|
state.data.bankData.iban = iban || '';
|
|
402
428
|
if (is_acknowledged)
|
|
403
429
|
state.data.bankData.confirmPolicy = is_acknowledged;
|
|
430
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { bank_account: bank_account, board_id: data.id });
|
|
431
|
+
state.data.verify.token = token;
|
|
404
432
|
})
|
|
405
433
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
406
434
|
state.error = action.error.message;
|
|
@@ -428,17 +456,18 @@ export var bankSlice = createSlice({
|
|
|
428
456
|
state.error = null;
|
|
429
457
|
})
|
|
430
458
|
.addCase(verifyBankLeadOTP.fulfilled, function (state, action) {
|
|
431
|
-
var _a;
|
|
432
459
|
state.loading = false;
|
|
433
460
|
state.error = null;
|
|
434
|
-
var
|
|
435
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
436
|
-
if (description) {
|
|
437
|
-
state.error = description;
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
461
|
+
var _a = action.payload, data = _a.data, bank_account = _a.bankData, formData = _a.formData;
|
|
440
462
|
state.data.otpData = formData;
|
|
441
463
|
state.data.otpData.responseBody = data;
|
|
464
|
+
var _b = bank_account || {}, bank_name = _b.bank_name, beneficiary_name = _b.beneficiary_name, iban = _b.iban, is_acknowledged = _b.is_acknowledged;
|
|
465
|
+
state.data.bankData.bankName = bank_name || '';
|
|
466
|
+
state.data.bankData.beneficiaryName = beneficiary_name || '';
|
|
467
|
+
state.data.bankData.iban = iban || '';
|
|
468
|
+
if (is_acknowledged)
|
|
469
|
+
state.data.bankData.confirmPolicy = is_acknowledged;
|
|
470
|
+
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { bank_account: bank_account, board_id: data.id });
|
|
442
471
|
})
|
|
443
472
|
.addCase(verifyBankLeadOTP.rejected, function (state, action) {
|
|
444
473
|
state.loading = false;
|
|
@@ -451,7 +480,7 @@ export var bankSlice = createSlice({
|
|
|
451
480
|
.addCase(retrieveBoardDetails.fulfilled, function (state, action) {
|
|
452
481
|
state.error = null;
|
|
453
482
|
state.loading = false;
|
|
454
|
-
var data =
|
|
483
|
+
var data = action.payload || {};
|
|
455
484
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
456
485
|
})
|
|
457
486
|
.addCase(retrieveBoardDetails.rejected, function (state, action) {
|
|
@@ -476,18 +505,8 @@ export var bankSlice = createSlice({
|
|
|
476
505
|
var _a;
|
|
477
506
|
state.loading = false;
|
|
478
507
|
state.error = null;
|
|
479
|
-
var
|
|
480
|
-
|
|
481
|
-
if (description) {
|
|
482
|
-
state.error = description;
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
var flows = response.flows;
|
|
486
|
-
var _b = state.data.verify.responseBody || {}, individuals = _b.individuals, individualData = _b.individualData;
|
|
487
|
-
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
488
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows }), (individualData && { user: individualData })), (data_state && {
|
|
489
|
-
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
490
|
-
}));
|
|
508
|
+
var _b = action.payload || {}, flows = _b.flows, data = _b.data;
|
|
509
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, recipient: (_a = data === null || data === void 0 ? void 0 : data.notification) === null || _a === void 0 ? void 0 : _a.recipient });
|
|
491
510
|
})
|
|
492
511
|
.addCase(updateBoardSuccess.pending, function (state) {
|
|
493
512
|
state.loading = true;
|
|
@@ -505,7 +524,7 @@ export var bankSlice = createSlice({
|
|
|
505
524
|
state.loading = false;
|
|
506
525
|
state.error = null;
|
|
507
526
|
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
508
|
-
state.data.bankData = formData;
|
|
527
|
+
state.data.bankData = __assign(__assign({}, formData), { bankStatementId: undefined });
|
|
509
528
|
state.data.bankData.responseBody = data;
|
|
510
529
|
})
|
|
511
530
|
.addCase(createBankAccount.rejected, function (state, action) {
|