@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 +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5613,6 +5613,7 @@ function StepRenderer({
|
|
|
5613
5613
|
otpCode,
|
|
5614
5614
|
selectSourceChainName,
|
|
5615
5615
|
selectSourceTokenSymbol,
|
|
5616
|
+
savingOneTapLimit,
|
|
5616
5617
|
merchantName,
|
|
5617
5618
|
onBack,
|
|
5618
5619
|
onDismiss,
|
|
@@ -5736,7 +5737,7 @@ function StepRenderer({
|
|
|
5736
5737
|
onSetupOneTap: handlers.onSetupOneTap,
|
|
5737
5738
|
onBack: () => handlers.onNavigate("deposit"),
|
|
5738
5739
|
onLogout: handlers.onLogout,
|
|
5739
|
-
loading:
|
|
5740
|
+
loading: savingOneTapLimit,
|
|
5740
5741
|
error: state.error
|
|
5741
5742
|
}
|
|
5742
5743
|
);
|
|
@@ -6013,6 +6014,7 @@ function SwypePaymentInner({
|
|
|
6013
6014
|
const [otpCode, setOtpCode] = useState("");
|
|
6014
6015
|
const [selectSourceChainName, setSelectSourceChainName] = useState("");
|
|
6015
6016
|
const [selectSourceTokenSymbol, setSelectSourceTokenSymbol] = useState("");
|
|
6017
|
+
const [savingOneTapLimit, setSavingOneTapLimit] = useState(false);
|
|
6016
6018
|
const authExecutor = useAuthorizationExecutor();
|
|
6017
6019
|
const polling = useTransferPolling();
|
|
6018
6020
|
pollingRef.current = polling;
|
|
@@ -6641,6 +6643,7 @@ function SwypePaymentInner({
|
|
|
6641
6643
|
[state.accounts, depositAmount]
|
|
6642
6644
|
);
|
|
6643
6645
|
const handleSetupOneTap = useCallback(async (limit) => {
|
|
6646
|
+
setSavingOneTapLimit(true);
|
|
6644
6647
|
try {
|
|
6645
6648
|
const token = await getAccessToken();
|
|
6646
6649
|
if (!token) throw new Error("Not authenticated");
|
|
@@ -6656,6 +6659,8 @@ function SwypePaymentInner({
|
|
|
6656
6659
|
type: "SET_ERROR",
|
|
6657
6660
|
error: err instanceof Error ? err.message : "Failed to save One-Tap limit"
|
|
6658
6661
|
});
|
|
6662
|
+
} finally {
|
|
6663
|
+
setSavingOneTapLimit(false);
|
|
6659
6664
|
}
|
|
6660
6665
|
}, [getAccessToken, apiBaseUrl, authExecutor]);
|
|
6661
6666
|
const handleNewPayment = useCallback(() => {
|
|
@@ -7281,6 +7286,7 @@ function SwypePaymentInner({
|
|
|
7281
7286
|
otpCode,
|
|
7282
7287
|
selectSourceChainName,
|
|
7283
7288
|
selectSourceTokenSymbol,
|
|
7289
|
+
savingOneTapLimit,
|
|
7284
7290
|
merchantName,
|
|
7285
7291
|
onBack,
|
|
7286
7292
|
onDismiss,
|