@swype-org/react-sdk 0.1.130 → 0.1.131
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 +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6007,6 +6007,7 @@ function SwypePaymentInner({
|
|
|
6007
6007
|
const initializedSelectSourceActionRef = react.useRef(null);
|
|
6008
6008
|
const preSelectSourceStepRef = react.useRef(null);
|
|
6009
6009
|
const pendingTokenAuthRef = react.useRef(null);
|
|
6010
|
+
const pendingTokenSelectionRef = react.useRef(null);
|
|
6010
6011
|
const reauthSessionIdRef = react.useRef(null);
|
|
6011
6012
|
const reauthTokenRef = react.useRef(null);
|
|
6012
6013
|
const checkingPasskeyRef = react.useRef(false);
|
|
@@ -6508,7 +6509,8 @@ function SwypePaymentInner({
|
|
|
6508
6509
|
dispatch({ type: "NAVIGATE", step: "setup-status" });
|
|
6509
6510
|
await authExecutor.executeSessionById(session.id);
|
|
6510
6511
|
await reloadAccounts();
|
|
6511
|
-
|
|
6512
|
+
pendingTokenSelectionRef.current = { walletId: _walletId, tokenSymbol };
|
|
6513
|
+
dispatch({ type: "NAVIGATE", step: "setup" });
|
|
6512
6514
|
}
|
|
6513
6515
|
} catch (err) {
|
|
6514
6516
|
captureException(err);
|
|
@@ -6658,6 +6660,10 @@ function SwypePaymentInner({
|
|
|
6658
6660
|
await updateUserConfig(apiBaseUrl, token, { defaultAllowance: limit });
|
|
6659
6661
|
if (authExecutor.pendingOneTapSetup) {
|
|
6660
6662
|
authExecutor.resolveOneTapSetup();
|
|
6663
|
+
} else if (pendingTokenSelectionRef.current) {
|
|
6664
|
+
const sel = pendingTokenSelectionRef.current;
|
|
6665
|
+
pendingTokenSelectionRef.current = null;
|
|
6666
|
+
dispatch({ type: "SELECT_TOKEN", walletId: sel.walletId, tokenSymbol: sel.tokenSymbol });
|
|
6661
6667
|
} else {
|
|
6662
6668
|
dispatch({ type: "NAVIGATE", step: "deposit" });
|
|
6663
6669
|
}
|
|
@@ -6676,6 +6682,7 @@ function SwypePaymentInner({
|
|
|
6676
6682
|
processingStartedAtRef.current = null;
|
|
6677
6683
|
pollingTransferIdRef.current = null;
|
|
6678
6684
|
preSelectSourceStepRef.current = null;
|
|
6685
|
+
pendingTokenSelectionRef.current = null;
|
|
6679
6686
|
dispatch({
|
|
6680
6687
|
type: "NEW_PAYMENT",
|
|
6681
6688
|
depositAmount,
|
|
@@ -6693,6 +6700,7 @@ function SwypePaymentInner({
|
|
|
6693
6700
|
}
|
|
6694
6701
|
polling.stopPolling();
|
|
6695
6702
|
preSelectSourceStepRef.current = null;
|
|
6703
|
+
pendingTokenSelectionRef.current = null;
|
|
6696
6704
|
checkingPasskeyRef.current = false;
|
|
6697
6705
|
setAuthInput("");
|
|
6698
6706
|
setOtpCode("");
|