@swype-org/react-sdk 0.1.124 → 0.1.125

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
@@ -5616,6 +5616,7 @@ function StepRenderer({
5616
5616
  otpCode,
5617
5617
  selectSourceChainName,
5618
5618
  selectSourceTokenSymbol,
5619
+ savingOneTapLimit,
5619
5620
  merchantName,
5620
5621
  onBack,
5621
5622
  onDismiss,
@@ -5739,7 +5740,7 @@ function StepRenderer({
5739
5740
  onSetupOneTap: handlers.onSetupOneTap,
5740
5741
  onBack: () => handlers.onNavigate("deposit"),
5741
5742
  onLogout: handlers.onLogout,
5742
- loading: state.creatingTransfer,
5743
+ loading: savingOneTapLimit,
5743
5744
  error: state.error
5744
5745
  }
5745
5746
  );
@@ -6016,6 +6017,7 @@ function SwypePaymentInner({
6016
6017
  const [otpCode, setOtpCode] = react.useState("");
6017
6018
  const [selectSourceChainName, setSelectSourceChainName] = react.useState("");
6018
6019
  const [selectSourceTokenSymbol, setSelectSourceTokenSymbol] = react.useState("");
6020
+ const [savingOneTapLimit, setSavingOneTapLimit] = react.useState(false);
6019
6021
  const authExecutor = useAuthorizationExecutor();
6020
6022
  const polling = useTransferPolling();
6021
6023
  pollingRef.current = polling;
@@ -6644,6 +6646,7 @@ function SwypePaymentInner({
6644
6646
  [state.accounts, depositAmount]
6645
6647
  );
6646
6648
  const handleSetupOneTap = react.useCallback(async (limit) => {
6649
+ setSavingOneTapLimit(true);
6647
6650
  try {
6648
6651
  const token = await getAccessToken();
6649
6652
  if (!token) throw new Error("Not authenticated");
@@ -6659,6 +6662,8 @@ function SwypePaymentInner({
6659
6662
  type: "SET_ERROR",
6660
6663
  error: err instanceof Error ? err.message : "Failed to save One-Tap limit"
6661
6664
  });
6665
+ } finally {
6666
+ setSavingOneTapLimit(false);
6662
6667
  }
6663
6668
  }, [getAccessToken, apiBaseUrl, authExecutor]);
6664
6669
  const handleNewPayment = react.useCallback(() => {
@@ -7284,6 +7289,7 @@ function SwypePaymentInner({
7284
7289
  otpCode,
7285
7290
  selectSourceChainName,
7286
7291
  selectSourceTokenSymbol,
7292
+ savingOneTapLimit,
7287
7293
  merchantName,
7288
7294
  onBack,
7289
7295
  onDismiss,