@swype-org/react-sdk 0.1.67 → 0.1.69
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 +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1610,6 +1610,9 @@ function resolvePostAuthStep(state) {
|
|
|
1610
1610
|
return { step: "create-passkey", clearPersistedFlow: false };
|
|
1611
1611
|
}
|
|
1612
1612
|
if (state.persistedMobileFlow) {
|
|
1613
|
+
if (state.persistedMobileFlow.isSetup && hasActiveWallet(state.accounts)) {
|
|
1614
|
+
return { step: "deposit", clearPersistedFlow: true };
|
|
1615
|
+
}
|
|
1613
1616
|
return { step: "open-wallet", clearPersistedFlow: false };
|
|
1614
1617
|
}
|
|
1615
1618
|
if ((state.accounts.length === 0 || !hasActiveWallet(state.accounts)) && !state.connectingNewAccount) {
|
|
@@ -1627,6 +1630,9 @@ function resolveRestoredMobileFlow(transferStatus, isSetup) {
|
|
|
1627
1630
|
if (transferStatus === "FAILED") {
|
|
1628
1631
|
return { kind: "resume-failed", step: "success", clearPersistedFlow: true };
|
|
1629
1632
|
}
|
|
1633
|
+
if (isSetup) {
|
|
1634
|
+
return { kind: "resume-stale-setup", step: "wallet-picker", clearPersistedFlow: true };
|
|
1635
|
+
}
|
|
1630
1636
|
return { kind: "resume-open-wallet", step: "open-wallet", clearPersistedFlow: false };
|
|
1631
1637
|
}
|
|
1632
1638
|
var FOOTER_CSS = `
|
|
@@ -4504,13 +4510,13 @@ function SwypePaymentInner({
|
|
|
4504
4510
|
polling.startPolling(persisted.transferId);
|
|
4505
4511
|
}, [polling]);
|
|
4506
4512
|
const handleAuthorizedMobileReturn = useCallback(async (authorizedTransfer, isSetup) => {
|
|
4507
|
-
setTransfer(authorizedTransfer);
|
|
4508
4513
|
polling.stopPolling();
|
|
4509
4514
|
if (isSetup) {
|
|
4510
4515
|
mobileSetupFlowRef.current = false;
|
|
4511
4516
|
clearMobileFlowState();
|
|
4512
4517
|
try {
|
|
4513
4518
|
await reloadAccounts();
|
|
4519
|
+
setTransfer(null);
|
|
4514
4520
|
setError(null);
|
|
4515
4521
|
setDeeplinkUri(null);
|
|
4516
4522
|
setMobileFlow(false);
|
|
@@ -4523,6 +4529,7 @@ function SwypePaymentInner({
|
|
|
4523
4529
|
}
|
|
4524
4530
|
return;
|
|
4525
4531
|
}
|
|
4532
|
+
setTransfer(authorizedTransfer);
|
|
4526
4533
|
mobileSetupFlowRef.current = false;
|
|
4527
4534
|
clearMobileFlowState();
|
|
4528
4535
|
setError(null);
|
|
@@ -4679,6 +4686,11 @@ function SwypePaymentInner({
|
|
|
4679
4686
|
setStep("success");
|
|
4680
4687
|
return;
|
|
4681
4688
|
}
|
|
4689
|
+
if (mobileResolution.kind === "resume-stale-setup") {
|
|
4690
|
+
clearMobileFlowState();
|
|
4691
|
+
if (!cancelled) setStep("wallet-picker");
|
|
4692
|
+
return;
|
|
4693
|
+
}
|
|
4682
4694
|
} catch (err) {
|
|
4683
4695
|
if (cancelled) return;
|
|
4684
4696
|
enterPersistedMobileFlow(
|