@tap-payments/auth-jsconnect 2.12.11-development → 2.12.12-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.
@@ -52,6 +52,7 @@ var OTP = function () {
52
52
  var _b = useAppSelector(connectExpressSelector), data = _b.data, loading = _b.loading, error = _b.error;
53
53
  var st = useSanitizedTranslation();
54
54
  var isAr = useLanguage().isAr;
55
+ var isStartWithEmail = data.otpData.authFor === AuthForType.EMAIL;
55
56
  var methods = useForm({
56
57
  resolver: yupResolver(OTPValidation),
57
58
  defaultValues: data.otpData,
@@ -72,7 +73,7 @@ var OTP = function () {
72
73
  };
73
74
  }, []);
74
75
  var onSubmit = function (formData) {
75
- if (data.otpData.authFor === AuthForType.EMAIL) {
76
+ if (isStartWithEmail) {
76
77
  dispatch(verifyEmailOtpAsync(deepCopy(formData)));
77
78
  }
78
79
  else {
@@ -80,7 +81,8 @@ var OTP = function () {
80
81
  }
81
82
  };
82
83
  var onBack = function () {
83
- dispatch(handlePrevScreenStep());
84
+ var screen = isStartWithEmail ? 'CONNECT_EXPRESS_EMAIL_STEP' : 'CONNECT_EXPRESS_MOBILE_STEP';
85
+ dispatch(handlePrevScreenStep(screen));
84
86
  };
85
87
  var disabled = !methods.formState.isValid;
86
88
  var isEmailFlow = data.otpData.authFor === AuthForType.EMAIL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.12.11-development",
3
+ "version": "2.12.12-development",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",