@swype-org/react-sdk 0.1.25 → 0.1.26
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 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -799,7 +799,7 @@ async function deviceHasPasskey(credentialId) {
|
|
|
799
799
|
type: "public-key",
|
|
800
800
|
id: base64ToBytes(credentialId)
|
|
801
801
|
}],
|
|
802
|
-
userVerification: "
|
|
802
|
+
userVerification: "discouraged",
|
|
803
803
|
timeout: 3e4
|
|
804
804
|
}
|
|
805
805
|
});
|
|
@@ -2270,17 +2270,15 @@ function SwypePayment({
|
|
|
2270
2270
|
const loadingDataRef = react.useRef(false);
|
|
2271
2271
|
react.useEffect(() => {
|
|
2272
2272
|
if (!authenticated) return;
|
|
2273
|
+
if (step === "login") return;
|
|
2273
2274
|
if (accounts.length > 0 || loadingDataRef.current) return;
|
|
2275
|
+
if (!activeCredentialId) return;
|
|
2274
2276
|
let cancelled = false;
|
|
2275
2277
|
loadingDataRef.current = true;
|
|
2276
2278
|
const load = async () => {
|
|
2277
2279
|
setLoadingData(true);
|
|
2278
2280
|
setError(null);
|
|
2279
2281
|
try {
|
|
2280
|
-
if (!activeCredentialId) {
|
|
2281
|
-
setStep("register-passkey");
|
|
2282
|
-
return;
|
|
2283
|
-
}
|
|
2284
2282
|
const token = await getAccessToken();
|
|
2285
2283
|
if (!token) throw new Error("Not authenticated");
|
|
2286
2284
|
const [prov, accts, chn] = await Promise.all([
|
|
@@ -2317,7 +2315,7 @@ function SwypePayment({
|
|
|
2317
2315
|
cancelled = true;
|
|
2318
2316
|
loadingDataRef.current = false;
|
|
2319
2317
|
};
|
|
2320
|
-
}, [authenticated, accounts.length, apiBaseUrl, getAccessToken, activeCredentialId]);
|
|
2318
|
+
}, [authenticated, step, accounts.length, apiBaseUrl, getAccessToken, activeCredentialId]);
|
|
2321
2319
|
react.useEffect(() => {
|
|
2322
2320
|
if (!polling.transfer) return;
|
|
2323
2321
|
if (polling.transfer.status === "COMPLETED") {
|