@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.cjs
CHANGED
|
@@ -5233,6 +5233,9 @@ function SwypePaymentInner({
|
|
|
5233
5233
|
const processingStartedAtRef = react.useRef(null);
|
|
5234
5234
|
const initializedSelectSourceActionRef = react.useRef(null);
|
|
5235
5235
|
const preSelectSourceStepRef = react.useRef(null);
|
|
5236
|
+
const checkingPasskeyRef = react.useRef(false);
|
|
5237
|
+
const onCompleteRef = react.useRef(onComplete);
|
|
5238
|
+
onCompleteRef.current = onComplete;
|
|
5236
5239
|
const [authInput, setAuthInput] = react.useState("");
|
|
5237
5240
|
const [otpCode, setOtpCode] = react.useState("");
|
|
5238
5241
|
const [selectSourceChainName, setSelectSourceChainName] = react.useState("");
|
|
@@ -5811,6 +5814,8 @@ function SwypePaymentInner({
|
|
|
5811
5814
|
react.useEffect(() => {
|
|
5812
5815
|
if (!ready || !authenticated) return;
|
|
5813
5816
|
if (state.step !== "login" && state.step !== "otp-verify") return;
|
|
5817
|
+
if (checkingPasskeyRef.current) return;
|
|
5818
|
+
checkingPasskeyRef.current = true;
|
|
5814
5819
|
let cancelled = false;
|
|
5815
5820
|
dispatch({ type: "SET_ERROR", error: null });
|
|
5816
5821
|
setAuthInput("");
|
|
@@ -5958,6 +5963,7 @@ function SwypePaymentInner({
|
|
|
5958
5963
|
checkPasskey();
|
|
5959
5964
|
return () => {
|
|
5960
5965
|
cancelled = true;
|
|
5966
|
+
checkingPasskeyRef.current = false;
|
|
5961
5967
|
};
|
|
5962
5968
|
}, [
|
|
5963
5969
|
ready,
|