@tap-payments/auth-jsconnect 2.0.124-test → 2.0.125-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.
@@ -220,7 +220,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
220
220
  hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
221
221
  hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
222
222
  isIdentityAuthStep = data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH;
223
- if (!(isSA(countryIso2) && !isIdentityAuthStep)) return [3, 4];
223
+ if (!(isSA(countryIso2) && !isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 4];
224
224
  return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
225
225
  case 3:
226
226
  _j.sent();
@@ -43,6 +43,7 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
43
43
  name: any;
44
44
  contact: any;
45
45
  countries: CountryCode[];
46
+ countryCode: any;
46
47
  notification: any;
47
48
  flows: {
48
49
  name: string;
@@ -251,6 +251,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
251
251
  name: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.names,
252
252
  contact: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.contact,
253
253
  countries: countries,
254
+ countryCode: countryCode,
254
255
  notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
255
256
  flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
256
257
  },
@@ -433,7 +434,7 @@ export var individualSlice = createSlice({
433
434
  state.data.otpData = formData;
434
435
  state.data.otpData.responseBody = data;
435
436
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
436
- var _c = boardResponse || {}, countries = _c.countries, user = _c.user;
437
+ var _c = boardResponse || {}, countries = _c.countries, user = _c.user, countryCode = _c.countryCode;
437
438
  var _d = user || {}, source_income = _d.source_income, monthly_income = _d.monthly_income, occupation = _d.occupation, is_relative_PEP = _d.is_relative_PEP, is_influencer = _d.is_influencer;
438
439
  var _e = state.data.individualData.responseBody || {}, sourceIncomeList = _e.sourceIncomeList, monthlyIncomeList = _e.monthlyIncomeList, occupationList = _e.occupationList;
439
440
  var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) ||
@@ -444,7 +445,7 @@ export var individualSlice = createSlice({
444
445
  (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList[2]);
445
446
  if (!!selectedMonthlyIncome)
446
447
  state.data.individualData.monthlyIncome = selectedMonthlyIncome;
447
- var code = user === null || user === void 0 ? void 0 : user.employer_country;
448
+ var code = (user === null || user === void 0 ? void 0 : user.employer_country) || countryCode;
448
449
  if (!!code) {
449
450
  var employerLocation = (countries || []).find(function (country) { return country.iso2 === code; });
450
451
  state.data.individualData.employerLocation = employerLocation;
@@ -62,7 +62,7 @@ var SuccessWithFlowButtons = function () {
62
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
63
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
64
64
  var identification = user.identification;
65
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
65
+ var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
66
66
  var settings = useAppSelector(settingsSelector);
67
67
  var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
68
68
  var email = (contact || { email: '' }).email;
@@ -78,10 +78,10 @@ var SuccessWithFlowButtons = function () {
78
78
  var title = t("".concat(name, "_flow_").concat(type), {
79
79
  individual_name: username.toLowerCase() + maskedId,
80
80
  business_type: brandName,
81
- license_number: t('masking_symbols') + showLastFour(licenseNumber),
81
+ license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
82
82
  bank_name: bankName,
83
- iban: t('masking_symbols') + iban,
84
- tax_id: t('masking_symbols') + showLastFour(taxID)
83
+ iban: iban ? t('masking_symbols') + iban : '',
84
+ tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
85
85
  });
86
86
  var isCompleted = status === 'completed' && name !== 'password';
87
87
  var isIndividual = name === 'individual';
@@ -61,7 +61,7 @@ var SuccessWithFlowButtons = function () {
61
61
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
62
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
63
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
64
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
64
+ var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
65
65
  var settings = useAppSelector(settingsSelector);
66
66
  var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
67
67
  var email = (contact || { email: '' }).email;
@@ -77,10 +77,10 @@ var SuccessWithFlowButtons = function () {
77
77
  var title = t("".concat(name, "_flow_").concat(type), {
78
78
  individual_name: username.toLowerCase() + maskedId,
79
79
  business_type: brandName,
80
- license_number: t('masking_symbols') + showLastFour(licenseNumber),
80
+ license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
81
81
  bank_name: bankName,
82
- iban: t('masking_symbols') + iban,
83
- tax_id: t('masking_symbols') + showLastFour(taxID)
82
+ iban: iban ? t('masking_symbols') + iban : '',
83
+ tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
84
84
  });
85
85
  var isCompleted = status === 'completed' && name !== 'password';
86
86
  var isIndividual = name === 'individual';
@@ -59,7 +59,7 @@ var SuccessWithFlowButtons = function () {
59
59
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
60
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
61
  var identification = (user || {}).identification;
62
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
62
+ var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
63
63
  var settings = useAppSelector(settingsSelector);
64
64
  var _g = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _g.contact, board_id = _g.board_id, board_info_id = _g.board_info_id;
65
65
  var email = (contact || { email: '' }).email;
@@ -75,10 +75,10 @@ var SuccessWithFlowButtons = function () {
75
75
  var title = t("".concat(name, "_flow_").concat(type), {
76
76
  individual_name: username.toLowerCase() + maskedId,
77
77
  business_type: brandName,
78
- license_number: t('masking_symbols') + showLastFour(licenseNumber),
78
+ license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
79
79
  bank_name: bankName,
80
- iban: t('masking_symbols') + iban,
81
- tax_id: t('masking_symbols') + showLastFour(taxID)
80
+ iban: iban ? t('masking_symbols') + iban : '',
81
+ tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
82
82
  });
83
83
  var isCompleted = status === 'completed' && name !== 'password';
84
84
  var isIndividual = name === 'individual';
@@ -62,7 +62,7 @@ var SuccessWithFlowButtons = function () {
62
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
63
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
64
64
  var identification = (user || {}).identification;
65
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
65
+ var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
66
66
  var settings = useAppSelector(settingsSelector);
67
67
  var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
68
68
  var email = (contact || { email: '' }).email;
@@ -78,10 +78,10 @@ var SuccessWithFlowButtons = function () {
78
78
  var title = t("".concat(name, "_flow_").concat(type), {
79
79
  individual_name: username.toLowerCase() + maskedId,
80
80
  business_type: brandName,
81
- license_number: t('masking_symbols') + showLastFour(licenseNumber),
81
+ license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
82
82
  bank_name: bankName,
83
- iban: t('masking_symbols') + iban,
84
- tax_id: t('masking_symbols') + showLastFour(taxID)
83
+ iban: iban ? t('masking_symbols') + iban : '',
84
+ tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
85
85
  });
86
86
  var isCompleted = status === 'completed' && name !== 'password';
87
87
  var isIndividual = name === 'individual';
@@ -62,7 +62,7 @@ var SuccessWithFlowButtons = function () {
62
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
63
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
64
64
  var identification = user.identification;
65
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
65
+ var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
66
66
  var settings = useAppSelector(settingsSelector);
67
67
  var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
68
68
  var email = (contact || { email: '' }).email;
@@ -78,10 +78,10 @@ var SuccessWithFlowButtons = function () {
78
78
  var title = t("".concat(name, "_flow_").concat(type), {
79
79
  individual_name: username.toLowerCase() + maskedId,
80
80
  business_type: brandName,
81
- license_number: t('masking_symbols') + showLastFour(licenseNumber),
81
+ license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
82
82
  bank_name: bankName,
83
- iban: t('masking_symbols') + iban,
84
- tax_id: t('masking_symbols') + showLastFour(taxID)
83
+ iban: iban ? t('masking_symbols') + iban : '',
84
+ tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
85
85
  });
86
86
  var isCompleted = status === 'completed' && name !== 'password';
87
87
  var isIndividual = name === 'individual';
@@ -62,7 +62,7 @@ var SuccessWithFlowButtons = function () {
62
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
63
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
64
64
  var identification = user.identification;
65
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
65
+ var maskedId = (identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
66
66
  var settings = useAppSelector(settingsSelector);
67
67
  var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
68
68
  var email = (contact || { email: '' }).email;
@@ -78,10 +78,10 @@ var SuccessWithFlowButtons = function () {
78
78
  var title = t("".concat(name, "_flow_").concat(type), {
79
79
  individual_name: username.toLowerCase() + maskedId,
80
80
  business_type: brandName,
81
- license_number: t('masking_symbols') + showLastFour(licenseNumber),
81
+ license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
82
82
  bank_name: bankName,
83
- iban: t('masking_symbols') + iban,
84
- tax_id: t('masking_symbols') + showLastFour(taxID)
83
+ iban: iban ? t('masking_symbols') + iban : '',
84
+ tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
85
85
  });
86
86
  var isCompleted = status === 'completed' && name !== 'password';
87
87
  var isIndividual = name === 'individual';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.124-test",
3
+ "version": "2.0.125-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",