@tap-payments/auth-jsconnect 2.0.58-test → 2.0.59-test
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.
|
@@ -288,7 +288,7 @@ export var verifyPACI = createAsyncThunk('verifyPACI', function (params, thunkAp
|
|
|
288
288
|
case 2:
|
|
289
289
|
data = _f.sent();
|
|
290
290
|
response = data;
|
|
291
|
-
if (count === 1) {
|
|
291
|
+
if (count === 1 && (responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user) === false) {
|
|
292
292
|
thunkApi.dispatch(retrieveBrandList(data === null || data === void 0 ? void 0 : data.individual_id));
|
|
293
293
|
thunkApi.dispatch(retrieveChannels());
|
|
294
294
|
}
|
|
@@ -297,14 +297,14 @@ export var verifyPACI = createAsyncThunk('verifyPACI', function (params, thunkAp
|
|
|
297
297
|
return [4, ((_c = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _c === void 0 ? void 0 : _c.call(params))];
|
|
298
298
|
case 3:
|
|
299
299
|
_f.sent();
|
|
300
|
-
if (responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user) {
|
|
300
|
+
if ((responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user) && (data === null || data === void 0 ? void 0 : data.lead_id)) {
|
|
301
301
|
leadBody = {
|
|
302
302
|
leadId: data === null || data === void 0 ? void 0 : data.lead_id,
|
|
303
303
|
stepName: 'CONNECT_INDIVIDUAL_STEP'
|
|
304
304
|
};
|
|
305
305
|
thunkApi.dispatch(retrieveLead(leadBody));
|
|
306
306
|
}
|
|
307
|
-
else if (!(data === null || data === void 0 ? void 0 : data.lead_id)) {
|
|
307
|
+
else if (!(data === null || data === void 0 ? void 0 : data.lead_id) && (data === null || data === void 0 ? void 0 : data.individual_id)) {
|
|
308
308
|
leadBody = {
|
|
309
309
|
individualId: data === null || data === void 0 ? void 0 : data.individual_id,
|
|
310
310
|
stepName: 'CONNECT_MERCHANT_INFO_STEP'
|
|
@@ -390,20 +390,19 @@ export var retrieveChannels = createAsyncThunk('retrieveChannels', function () {
|
|
|
390
390
|
});
|
|
391
391
|
}); });
|
|
392
392
|
export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
393
|
-
var _a, settings, connect,
|
|
393
|
+
var _a, settings, connect, payload, data;
|
|
394
394
|
var _b, _c, _d, _e, _f, _g;
|
|
395
395
|
return __generator(this, function (_h) {
|
|
396
396
|
switch (_h.label) {
|
|
397
397
|
case 0:
|
|
398
398
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
399
|
-
isAbsher = connect.data.otpData.isAbsher;
|
|
400
399
|
payload = {
|
|
401
400
|
name: getIndividualName(params.name),
|
|
402
401
|
id: ((_b = connect.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.lead_id) || '',
|
|
403
402
|
country_code: (_c = settings.data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2,
|
|
404
403
|
contact: {
|
|
405
404
|
email: params.email,
|
|
406
|
-
phone:
|
|
405
|
+
phone: !!params.mobile
|
|
407
406
|
? {
|
|
408
407
|
country_code: (_e = (_d = params.countryCode) === null || _d === void 0 ? void 0 : _d.idd_prefix) === null || _e === void 0 ? void 0 : _e.toString(),
|
|
409
408
|
number: params.mobile || ''
|