@swype-org/react-sdk 0.1.115 → 0.1.116
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/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2169,7 +2169,7 @@ function paymentReducer(state, action) {
|
|
|
2169
2169
|
};
|
|
2170
2170
|
// ── Navigation & error ───────────────────────────────────────
|
|
2171
2171
|
case "NAVIGATE":
|
|
2172
|
-
return { ...state, step: action.step };
|
|
2172
|
+
return { ...state, step: action.step, error: null };
|
|
2173
2173
|
case "SET_ERROR":
|
|
2174
2174
|
return { ...state, error: action.error };
|
|
2175
2175
|
// ── Lifecycle ────────────────────────────────────────────────
|
|
@@ -6663,11 +6663,11 @@ function SwypePaymentInner({
|
|
|
6663
6663
|
}
|
|
6664
6664
|
}, [depositAmount]);
|
|
6665
6665
|
react.useEffect(() => {
|
|
6666
|
-
if (authenticated) return;
|
|
6666
|
+
if (authenticated || state.step !== "otp-verify") return;
|
|
6667
6667
|
if (activeOtpErrorMessage) dispatch({ type: "SET_ERROR", error: activeOtpErrorMessage });
|
|
6668
|
-
}, [activeOtpErrorMessage, authenticated]);
|
|
6668
|
+
}, [activeOtpErrorMessage, authenticated, state.step]);
|
|
6669
6669
|
react.useEffect(() => {
|
|
6670
|
-
if (state.step === "otp-verify" && /^\d{6}$/.test(otpCode.trim()) && activeOtpStatus
|
|
6670
|
+
if (state.step === "otp-verify" && /^\d{6}$/.test(otpCode.trim()) && activeOtpStatus === "awaiting-code-input") {
|
|
6671
6671
|
handleVerifyLoginCode();
|
|
6672
6672
|
}
|
|
6673
6673
|
}, [otpCode, state.step, activeOtpStatus, handleVerifyLoginCode]);
|