@swype-org/react-sdk 0.1.267 → 0.1.268
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 +25 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8704,7 +8704,6 @@ function useMobilePollingEffect(deps) {
|
|
|
8704
8704
|
const finishMobileAndDispatch = async () => {
|
|
8705
8705
|
mobileSetupFlowRef.current = false;
|
|
8706
8706
|
setupAccountIdRef.current = null;
|
|
8707
|
-
clearMobileFlowState();
|
|
8708
8707
|
try {
|
|
8709
8708
|
await reloadAccounts();
|
|
8710
8709
|
} catch {
|
|
@@ -8715,6 +8714,7 @@ function useMobilePollingEffect(deps) {
|
|
|
8715
8714
|
completedGuestPreauth = true;
|
|
8716
8715
|
cancelled = true;
|
|
8717
8716
|
await finishMobileAndDispatch();
|
|
8717
|
+
clearMobileFlowState();
|
|
8718
8718
|
dispatch({ type: "MOBILE_SETUP_COMPLETE" });
|
|
8719
8719
|
};
|
|
8720
8720
|
const completeGuestPreauthWithAccount = async (guestLookup) => {
|
|
@@ -8742,6 +8742,18 @@ function useMobilePollingEffect(deps) {
|
|
|
8742
8742
|
const guestLookup = await fetchGuestAccount(apiBaseUrl, guestToken);
|
|
8743
8743
|
if (cancelled) return;
|
|
8744
8744
|
if (guestLookup != null) {
|
|
8745
|
+
if (preauthSessionId) {
|
|
8746
|
+
try {
|
|
8747
|
+
const session = await fetchAuthorizationSession(
|
|
8748
|
+
apiBaseUrl,
|
|
8749
|
+
preauthSessionId
|
|
8750
|
+
);
|
|
8751
|
+
if (cancelled) return;
|
|
8752
|
+
if (session.status !== "AUTHORIZED") return;
|
|
8753
|
+
} catch {
|
|
8754
|
+
return;
|
|
8755
|
+
}
|
|
8756
|
+
}
|
|
8745
8757
|
await completeGuestPreauthWithAccount(guestLookup);
|
|
8746
8758
|
}
|
|
8747
8759
|
} catch {
|
|
@@ -8955,6 +8967,18 @@ function useGuestPreauthMobileRestoreEffect(deps) {
|
|
|
8955
8967
|
const guestLookup = await fetchGuestAccount(apiBaseUrl, guestToken);
|
|
8956
8968
|
if (cancelled) return;
|
|
8957
8969
|
if (guestLookup != null) {
|
|
8970
|
+
if (persisted.sessionId) {
|
|
8971
|
+
try {
|
|
8972
|
+
const session = await fetchAuthorizationSession(
|
|
8973
|
+
apiBaseUrl,
|
|
8974
|
+
persisted.sessionId
|
|
8975
|
+
);
|
|
8976
|
+
if (cancelled) return;
|
|
8977
|
+
if (session.status !== "AUTHORIZED") return;
|
|
8978
|
+
} catch {
|
|
8979
|
+
return;
|
|
8980
|
+
}
|
|
8981
|
+
}
|
|
8958
8982
|
await handleAccountFound(guestLookup);
|
|
8959
8983
|
}
|
|
8960
8984
|
} catch {
|