@swype-org/react-sdk 0.1.222 → 0.1.224

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 CHANGED
@@ -571,6 +571,7 @@ async function createTransfer(apiBaseUrl, token, params) {
571
571
  throw new Error("merchantAuthorization is required for transfer creation.");
572
572
  }
573
573
  const body = {
574
+ type: "standard",
574
575
  id: params.id ?? crypto.randomUUID(),
575
576
  credentialId: params.credentialId,
576
577
  merchantAuthorization: params.merchantAuthorization,
@@ -2206,7 +2207,9 @@ function paymentReducer(state, action) {
2206
2207
  transfer: action.transfer,
2207
2208
  step: "success",
2208
2209
  mobileFlow: false,
2209
- deeplinkUri: null
2210
+ deeplinkUri: null,
2211
+ isGuestFlow: true,
2212
+ guestSessionToken: action.guestSessionToken ?? state.guestSessionToken
2210
2213
  };
2211
2214
  case "GUEST_PREAUTH_DETECTED":
2212
2215
  return {
@@ -5909,6 +5912,9 @@ function StepRendererContent({
5909
5912
  );
5910
5913
  }
5911
5914
  if (step === "wallet-picker") {
5915
+ if (state.isGuestFlow && state.selectedProviderId && state.activeCredentialId) {
5916
+ return /* @__PURE__ */ jsxRuntime.jsx(BlinkLoadingScreen, {});
5917
+ }
5912
5918
  const isEntryPoint = !state.isGuestFlow && !authenticated;
5913
5919
  return /* @__PURE__ */ jsxRuntime.jsx(
5914
5920
  WalletPickerScreen,
@@ -6833,7 +6839,7 @@ function useMobileFlowHandlers(dispatch, polling, reloadAccounts, pollingTransfe
6833
6839
  cancelled = true;
6834
6840
  guestPollingActiveRef.current = false;
6835
6841
  clearMobileFlowState();
6836
- dispatch({ type: "GUEST_TRANSFER_COMPLETED", transfer });
6842
+ dispatch({ type: "GUEST_TRANSFER_COMPLETED", transfer, guestSessionToken });
6837
6843
  onCompleteRef.current?.(transfer);
6838
6844
  } else if (transfer.status === "FAILED") {
6839
6845
  cancelled = true;
@@ -8563,6 +8569,21 @@ function BlinkPaymentInner({
8563
8569
  oneTapLimitSavedDuringSetupRef: oneTapSetup.oneTapLimitSavedDuringSetupRef,
8564
8570
  handleAuthorizedMobileReturn: mobileFlow.handleAuthorizedMobileReturn
8565
8571
  });
8572
+ const autoSelectingRef = react.useRef(false);
8573
+ react.useEffect(() => {
8574
+ if (state.step !== "wallet-picker" || !state.isGuestFlow || !state.selectedProviderId || !state.activeCredentialId || !authenticated || autoSelectingRef.current) return;
8575
+ autoSelectingRef.current = true;
8576
+ provider.handleSelectProvider(state.selectedProviderId).finally(() => {
8577
+ autoSelectingRef.current = false;
8578
+ });
8579
+ }, [
8580
+ state.step,
8581
+ state.isGuestFlow,
8582
+ state.selectedProviderId,
8583
+ state.activeCredentialId,
8584
+ authenticated,
8585
+ provider
8586
+ ]);
8566
8587
  const handlers = react.useMemo(() => ({
8567
8588
  onSendLoginCode: auth.handleSendLoginCode,
8568
8589
  onVerifyLoginCode: auth.handleVerifyLoginCode,