@swype-org/react-sdk 0.1.125 → 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 +16 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7170,13 +7170,22 @@ function SwypePaymentInner({
|
|
|
7170
7170
|
}, [pendingSelectSourceAction, selectSourceChoices, selectSourceRecommended]);
|
|
7171
7171
|
useEffect(() => {
|
|
7172
7172
|
if (pendingSelectSourceAction && (state.step === "processing" || state.step === "open-wallet" || state.step === "setup-status")) {
|
|
7173
|
-
|
|
7174
|
-
|
|
7173
|
+
if (state.step === "setup-status") {
|
|
7174
|
+
const recommended = selectSourceRecommended;
|
|
7175
|
+
if (recommended) {
|
|
7176
|
+
authExecutor.resolveSelectSource(recommended);
|
|
7177
|
+
} else {
|
|
7178
|
+
authExecutor.resolveSelectSource({ chainName: "Base", tokenSymbol: "USDC" });
|
|
7179
|
+
}
|
|
7180
|
+
} else {
|
|
7181
|
+
preSelectSourceStepRef.current = state.step;
|
|
7182
|
+
dispatch({ type: "NAVIGATE", step: "select-source" });
|
|
7183
|
+
}
|
|
7175
7184
|
} else if (!pendingSelectSourceAction && state.step === "select-source") {
|
|
7176
7185
|
dispatch({ type: "NAVIGATE", step: preSelectSourceStepRef.current ?? "processing" });
|
|
7177
7186
|
preSelectSourceStepRef.current = null;
|
|
7178
7187
|
}
|
|
7179
|
-
}, [pendingSelectSourceAction, state.step]);
|
|
7188
|
+
}, [pendingSelectSourceAction, state.step, selectSourceRecommended, authExecutor]);
|
|
7180
7189
|
useEffect(() => {
|
|
7181
7190
|
if (!pendingSelectSourceAction || !pendingTokenAuthRef.current) return;
|
|
7182
7191
|
const { tokenAddress, chainId } = pendingTokenAuthRef.current;
|
|
@@ -7197,12 +7206,14 @@ function SwypePaymentInner({
|
|
|
7197
7206
|
useEffect(() => {
|
|
7198
7207
|
if (pendingOneTapSetupAction && state.step === "setup-status") {
|
|
7199
7208
|
preOneTapSetupStepRef.current = state.step;
|
|
7200
|
-
|
|
7209
|
+
reloadAccounts().then(() => {
|
|
7210
|
+
dispatch({ type: "NAVIGATE", step: "setup" });
|
|
7211
|
+
});
|
|
7201
7212
|
} else if (!pendingOneTapSetupAction && state.step === "setup" && preOneTapSetupStepRef.current) {
|
|
7202
7213
|
dispatch({ type: "NAVIGATE", step: preOneTapSetupStepRef.current });
|
|
7203
7214
|
preOneTapSetupStepRef.current = null;
|
|
7204
7215
|
}
|
|
7205
|
-
}, [pendingOneTapSetupAction, state.step]);
|
|
7216
|
+
}, [pendingOneTapSetupAction, state.step, reloadAccounts]);
|
|
7206
7217
|
const handlers = useMemo(() => ({
|
|
7207
7218
|
onSendLoginCode: handleSendLoginCode,
|
|
7208
7219
|
onVerifyLoginCode: handleVerifyLoginCode,
|