@swype-org/react-sdk 0.1.126 → 0.1.127

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
@@ -7173,13 +7173,22 @@ function SwypePaymentInner({
7173
7173
  }, [pendingSelectSourceAction, selectSourceChoices, selectSourceRecommended]);
7174
7174
  react.useEffect(() => {
7175
7175
  if (pendingSelectSourceAction && (state.step === "processing" || state.step === "open-wallet" || state.step === "setup-status")) {
7176
- preSelectSourceStepRef.current = state.step;
7177
- dispatch({ type: "NAVIGATE", step: "select-source" });
7176
+ if (state.step === "setup-status") {
7177
+ const recommended = selectSourceRecommended;
7178
+ if (recommended) {
7179
+ authExecutor.resolveSelectSource(recommended);
7180
+ } else {
7181
+ authExecutor.resolveSelectSource({ chainName: "Base", tokenSymbol: "USDC" });
7182
+ }
7183
+ } else {
7184
+ preSelectSourceStepRef.current = state.step;
7185
+ dispatch({ type: "NAVIGATE", step: "select-source" });
7186
+ }
7178
7187
  } else if (!pendingSelectSourceAction && state.step === "select-source") {
7179
7188
  dispatch({ type: "NAVIGATE", step: preSelectSourceStepRef.current ?? "processing" });
7180
7189
  preSelectSourceStepRef.current = null;
7181
7190
  }
7182
- }, [pendingSelectSourceAction, state.step]);
7191
+ }, [pendingSelectSourceAction, state.step, selectSourceRecommended, authExecutor]);
7183
7192
  react.useEffect(() => {
7184
7193
  if (!pendingSelectSourceAction || !pendingTokenAuthRef.current) return;
7185
7194
  const { tokenAddress, chainId } = pendingTokenAuthRef.current;