@swype-org/react-sdk 0.1.106 → 0.1.107

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
@@ -5827,6 +5827,11 @@ function SwypePaymentInner({
5827
5827
  dispatch({ type: "NAVIGATE", step: "create-passkey" });
5828
5828
  return;
5829
5829
  }
5830
+ const acct = state.accounts.find((a) => a.id === state.selectedAccountId);
5831
+ const matchedProvider = acct ? state.providers.find((p) => p.name === acct.name) : void 0;
5832
+ if (matchedProvider) {
5833
+ dispatch({ type: "SELECT_PROVIDER", providerId: matchedProvider.id });
5834
+ }
5830
5835
  dispatch({ type: "SET_ERROR", error: null });
5831
5836
  dispatch({ type: "SET_INCREASING_LIMIT", value: true });
5832
5837
  try {
@@ -5850,7 +5855,7 @@ function SwypePaymentInner({
5850
5855
  accountId: state.selectedAccountId,
5851
5856
  sessionId: session.id,
5852
5857
  deeplinkUri: session.uri,
5853
- providerId: null,
5858
+ providerId: matchedProvider?.id ?? null,
5854
5859
  isSetup: true
5855
5860
  });
5856
5861
  dispatch({ type: "MOBILE_DEEPLINK_READY", deeplinkUri: session.uri });
@@ -5871,6 +5876,8 @@ function SwypePaymentInner({
5871
5876
  }, [
5872
5877
  state.selectedAccountId,
5873
5878
  state.activeCredentialId,
5879
+ state.accounts,
5880
+ state.providers,
5874
5881
  apiBaseUrl,
5875
5882
  getAccessToken,
5876
5883
  authExecutor,
@@ -6438,7 +6445,7 @@ function SwypePaymentInner({
6438
6445
  initializedSelectSourceActionRef.current = pendingSelectSourceAction.id;
6439
6446
  }, [pendingSelectSourceAction, selectSourceChoices, selectSourceRecommended]);
6440
6447
  react.useEffect(() => {
6441
- if (pendingSelectSourceAction && state.step === "processing") {
6448
+ if (pendingSelectSourceAction && (state.step === "processing" || state.step === "open-wallet")) {
6442
6449
  preSelectSourceStepRef.current = state.step;
6443
6450
  dispatch({ type: "NAVIGATE", step: "select-source" });
6444
6451
  } else if (!pendingSelectSourceAction && state.step === "select-source") {