@swype-org/react-sdk 0.1.91 → 0.1.92
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 +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5230,6 +5230,9 @@ function SwypePaymentInner({
|
|
|
5230
5230
|
const processingStartedAtRef = useRef(null);
|
|
5231
5231
|
const initializedSelectSourceActionRef = useRef(null);
|
|
5232
5232
|
const preSelectSourceStepRef = useRef(null);
|
|
5233
|
+
const checkingPasskeyRef = useRef(false);
|
|
5234
|
+
const onCompleteRef = useRef(onComplete);
|
|
5235
|
+
onCompleteRef.current = onComplete;
|
|
5233
5236
|
const [authInput, setAuthInput] = useState("");
|
|
5234
5237
|
const [otpCode, setOtpCode] = useState("");
|
|
5235
5238
|
const [selectSourceChainName, setSelectSourceChainName] = useState("");
|
|
@@ -5808,6 +5811,8 @@ function SwypePaymentInner({
|
|
|
5808
5811
|
useEffect(() => {
|
|
5809
5812
|
if (!ready || !authenticated) return;
|
|
5810
5813
|
if (state.step !== "login" && state.step !== "otp-verify") return;
|
|
5814
|
+
if (checkingPasskeyRef.current) return;
|
|
5815
|
+
checkingPasskeyRef.current = true;
|
|
5811
5816
|
let cancelled = false;
|
|
5812
5817
|
dispatch({ type: "SET_ERROR", error: null });
|
|
5813
5818
|
setAuthInput("");
|
|
@@ -5955,6 +5960,7 @@ function SwypePaymentInner({
|
|
|
5955
5960
|
checkPasskey();
|
|
5956
5961
|
return () => {
|
|
5957
5962
|
cancelled = true;
|
|
5963
|
+
checkingPasskeyRef.current = false;
|
|
5958
5964
|
};
|
|
5959
5965
|
}, [
|
|
5960
5966
|
ready,
|