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