@swype-org/react-sdk 0.1.183 → 0.1.187

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
@@ -2324,16 +2324,98 @@ var mascotStyle = {
2324
2324
  width: 28,
2325
2325
  height: 28
2326
2326
  };
2327
- function ScreenHeader({ title, right, onBack, badge }) {
2327
+ function SettingsMenu({ onLogout }) {
2328
+ const { tokens } = useSwypeConfig();
2329
+ const [open, setOpen] = react.useState(false);
2330
+ const menuRef = react.useRef(null);
2331
+ const toggle = react.useCallback(() => setOpen((prev) => !prev), []);
2332
+ react.useEffect(() => {
2333
+ if (!open) return;
2334
+ const handleClickOutside = (e) => {
2335
+ if (menuRef.current && !menuRef.current.contains(e.target)) {
2336
+ setOpen(false);
2337
+ }
2338
+ };
2339
+ document.addEventListener("mousedown", handleClickOutside);
2340
+ return () => document.removeEventListener("mousedown", handleClickOutside);
2341
+ }, [open]);
2342
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: menuRef, style: containerStyle4, children: [
2343
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: toggle, style: triggerStyle(tokens.text), "aria-label": "Settings", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: [
2344
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "5", r: "2", fill: "currentColor" }),
2345
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
2346
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "19", r: "2", fill: "currentColor" })
2347
+ ] }) }),
2348
+ open && /* @__PURE__ */ jsxRuntime.jsx("div", { style: dropdownStyle(tokens), children: /* @__PURE__ */ jsxRuntime.jsxs(
2349
+ "button",
2350
+ {
2351
+ type: "button",
2352
+ onClick: () => {
2353
+ setOpen(false);
2354
+ onLogout();
2355
+ },
2356
+ style: menuItemStyle(tokens),
2357
+ children: [
2358
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 8, flexShrink: 0 }, children: [
2359
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
2360
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 17 21 12 16 7", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
2361
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
2362
+ ] }),
2363
+ "Log out"
2364
+ ]
2365
+ }
2366
+ ) })
2367
+ ] });
2368
+ }
2369
+ var containerStyle4 = {
2370
+ position: "relative"
2371
+ };
2372
+ var triggerStyle = (color) => ({
2373
+ background: "transparent",
2374
+ border: "none",
2375
+ cursor: "pointer",
2376
+ padding: 4,
2377
+ color,
2378
+ display: "flex",
2379
+ alignItems: "center",
2380
+ justifyContent: "center"
2381
+ });
2382
+ var dropdownStyle = (tokens) => ({
2383
+ position: "absolute",
2384
+ right: 0,
2385
+ top: "100%",
2386
+ marginTop: 4,
2387
+ minWidth: 140,
2388
+ background: tokens.bgCard,
2389
+ border: `1px solid ${tokens.border}`,
2390
+ borderRadius: 12,
2391
+ boxShadow: tokens.shadow,
2392
+ zIndex: 100,
2393
+ overflow: "hidden"
2394
+ });
2395
+ var menuItemStyle = (tokens) => ({
2396
+ width: "100%",
2397
+ display: "flex",
2398
+ alignItems: "center",
2399
+ padding: "12px 16px",
2400
+ background: "transparent",
2401
+ border: "none",
2402
+ cursor: "pointer",
2403
+ fontFamily: "inherit",
2404
+ fontSize: "0.85rem",
2405
+ fontWeight: 500,
2406
+ color: tokens.error
2407
+ });
2408
+ function ScreenHeader({ title, right, onBack, badge, onLogout }) {
2328
2409
  const { tokens } = useSwypeConfig();
2329
2410
  const flowPhase = useFlowPhase();
2411
+ const rightContent = onLogout ? /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) : right;
2330
2412
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyle, children: [
2331
2413
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: leftSlotStyle, children: onBack && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onBack, style: backButtonStyle(tokens.text), "aria-label": "Go back", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 18l-6-6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) }),
2332
2414
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: centerSlotStyle, children: flowPhase ? /* @__PURE__ */ jsxRuntime.jsx(StepProgress, { phase: flowPhase }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2333
2415
  title && /* @__PURE__ */ jsxRuntime.jsx("span", { style: titleStyle(tokens.text), children: title }),
2334
2416
  badge && /* @__PURE__ */ jsxRuntime.jsx("span", { style: badgeStyle(tokens.textMuted), children: badge })
2335
2417
  ] }) }),
2336
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: rightSlotStyle, children: right })
2418
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: rightSlotStyle, children: rightContent })
2337
2419
  ] });
2338
2420
  }
2339
2421
  var headerStyle = {
@@ -2374,7 +2456,7 @@ var badgeStyle = (color) => ({
2374
2456
  });
2375
2457
  function PoweredByFooter() {
2376
2458
  const { tokens } = useSwypeConfig();
2377
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle4(tokens.textMuted), children: [
2459
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle5(tokens.textMuted), children: [
2378
2460
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
2379
2461
  /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
2380
2462
  "path",
@@ -2388,7 +2470,7 @@ function PoweredByFooter() {
2388
2470
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: pillStyle(tokens.textMuted, tokens.border), children: "Beta Version" })
2389
2471
  ] });
2390
2472
  }
2391
- var containerStyle4 = (color) => ({
2473
+ var containerStyle5 = (color) => ({
2392
2474
  display: "flex",
2393
2475
  flexDirection: "column",
2394
2476
  alignItems: "center",
@@ -2487,12 +2569,12 @@ var defaultIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "
2487
2569
  ) });
2488
2570
  function InfoBanner({ children, icon }) {
2489
2571
  const { tokens } = useSwypeConfig();
2490
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle5(tokens.accent), children: [
2572
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle6(tokens.accent), children: [
2491
2573
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: iconStyle, children: icon ?? defaultIcon }),
2492
2574
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: textStyle, children })
2493
2575
  ] });
2494
2576
  }
2495
- var containerStyle5 = (accent) => ({
2577
+ var containerStyle6 = (accent) => ({
2496
2578
  display: "flex",
2497
2579
  alignItems: "flex-start",
2498
2580
  gap: 10,
@@ -2510,7 +2592,7 @@ var iconStyle = {
2510
2592
  };
2511
2593
  var textStyle = { flex: 1 };
2512
2594
  function WarningBanner({ title, children }) {
2513
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle6, children: [
2595
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle7, children: [
2514
2596
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyle2, children: [
2515
2597
  /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", style: iconStyle2, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z", fill: "#F57C00" }) }),
2516
2598
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: title })
@@ -2518,7 +2600,7 @@ function WarningBanner({ title, children }) {
2518
2600
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: bodyStyle2, children })
2519
2601
  ] });
2520
2602
  }
2521
- var containerStyle6 = {
2603
+ var containerStyle7 = {
2522
2604
  padding: "14px 16px",
2523
2605
  background: "#FFF8E1",
2524
2606
  border: "1px solid #FFE082",
@@ -2597,7 +2679,7 @@ function OtpInput({ value, onChange, length = 6, disabled }) {
2597
2679
  onChange(pasted);
2598
2680
  focusInput(Math.min(pasted.length, length - 1));
2599
2681
  }, [onChange, length, focusInput]);
2600
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: containerStyle7, children: digits.map((digit, i) => /* @__PURE__ */ jsxRuntime.jsx(
2682
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: containerStyle8, children: digits.map((digit, i) => /* @__PURE__ */ jsxRuntime.jsx(
2601
2683
  "input",
2602
2684
  {
2603
2685
  ref: (el) => {
@@ -2618,7 +2700,7 @@ function OtpInput({ value, onChange, length = 6, disabled }) {
2618
2700
  i
2619
2701
  )) });
2620
2702
  }
2621
- var containerStyle7 = {
2703
+ var containerStyle8 = {
2622
2704
  display: "flex",
2623
2705
  gap: 8,
2624
2706
  justifyContent: "center",
@@ -2727,7 +2809,7 @@ function SourceCard({
2727
2809
  }
2728
2810
  )
2729
2811
  ] }),
2730
- open && hasDropdown && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: dropdownStyle(tokens), children: [
2812
+ open && hasDropdown && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: dropdownStyle2(tokens), children: [
2731
2813
  accounts.map((account) => {
2732
2814
  const preferredWallet = getPreferredDepositWallet(account, depositAmount ?? 0);
2733
2815
  const active = hasActiveDepositWallet(account);
@@ -2848,7 +2930,7 @@ var changeStyle = (color) => ({
2848
2930
  fontFamily: "inherit",
2849
2931
  padding: 0
2850
2932
  });
2851
- var dropdownStyle = (tokens) => ({
2933
+ var dropdownStyle2 = (tokens) => ({
2852
2934
  position: "absolute",
2853
2935
  top: "100%",
2854
2936
  left: 0,
@@ -3069,87 +3151,6 @@ var detailStyle = (color) => ({
3069
3151
  fontSize: "0.75rem",
3070
3152
  color
3071
3153
  });
3072
- function SettingsMenu({ onLogout }) {
3073
- const { tokens } = useSwypeConfig();
3074
- const [open, setOpen] = react.useState(false);
3075
- const menuRef = react.useRef(null);
3076
- const toggle = react.useCallback(() => setOpen((prev) => !prev), []);
3077
- react.useEffect(() => {
3078
- if (!open) return;
3079
- const handleClickOutside = (e) => {
3080
- if (menuRef.current && !menuRef.current.contains(e.target)) {
3081
- setOpen(false);
3082
- }
3083
- };
3084
- document.addEventListener("mousedown", handleClickOutside);
3085
- return () => document.removeEventListener("mousedown", handleClickOutside);
3086
- }, [open]);
3087
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: menuRef, style: containerStyle8, children: [
3088
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: toggle, style: triggerStyle(tokens.text), "aria-label": "Settings", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: [
3089
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "5", r: "2", fill: "currentColor" }),
3090
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
3091
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "19", r: "2", fill: "currentColor" })
3092
- ] }) }),
3093
- open && /* @__PURE__ */ jsxRuntime.jsx("div", { style: dropdownStyle2(tokens), children: /* @__PURE__ */ jsxRuntime.jsxs(
3094
- "button",
3095
- {
3096
- type: "button",
3097
- onClick: () => {
3098
- setOpen(false);
3099
- onLogout();
3100
- },
3101
- style: menuItemStyle(tokens),
3102
- children: [
3103
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 8, flexShrink: 0 }, children: [
3104
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
3105
- /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 17 21 12 16 7", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
3106
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
3107
- ] }),
3108
- "Log out"
3109
- ]
3110
- }
3111
- ) })
3112
- ] });
3113
- }
3114
- var containerStyle8 = {
3115
- position: "relative"
3116
- };
3117
- var triggerStyle = (color) => ({
3118
- background: "transparent",
3119
- border: "none",
3120
- cursor: "pointer",
3121
- padding: 4,
3122
- color,
3123
- display: "flex",
3124
- alignItems: "center",
3125
- justifyContent: "center"
3126
- });
3127
- var dropdownStyle2 = (tokens) => ({
3128
- position: "absolute",
3129
- right: 0,
3130
- top: "100%",
3131
- marginTop: 4,
3132
- minWidth: 140,
3133
- background: tokens.bgCard,
3134
- border: `1px solid ${tokens.border}`,
3135
- borderRadius: 12,
3136
- boxShadow: tokens.shadow,
3137
- zIndex: 100,
3138
- overflow: "hidden"
3139
- });
3140
- var menuItemStyle = (tokens) => ({
3141
- width: "100%",
3142
- display: "flex",
3143
- alignItems: "center",
3144
- padding: "12px 16px",
3145
- background: "transparent",
3146
- border: "none",
3147
- cursor: "pointer",
3148
- fontFamily: "inherit",
3149
- fontSize: "0.85rem",
3150
- fontWeight: 500,
3151
- color: tokens.error
3152
- });
3153
3154
  function LoginScreen({
3154
3155
  authInput,
3155
3156
  onAuthInputChange,
@@ -3441,6 +3442,7 @@ var resendStyle = (color, disabled) => ({
3441
3442
  function PasskeyScreen({
3442
3443
  onCreatePasskey,
3443
3444
  onBack,
3445
+ onLogout,
3444
3446
  creating,
3445
3447
  error,
3446
3448
  popupFallback = false,
@@ -3457,7 +3459,7 @@ function PasskeyScreen({
3457
3459
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
3458
3460
  ] }),
3459
3461
  children: [
3460
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
3462
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack, onLogout }),
3461
3463
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle4, children: [
3462
3464
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
3463
3465
  error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle2(tokens), children: error })
@@ -3547,7 +3549,8 @@ function WalletPickerScreen({
3547
3549
  onPrepareProvider,
3548
3550
  onSelectProvider,
3549
3551
  onContinueConnection,
3550
- onBack
3552
+ onBack,
3553
+ onLogout
3551
3554
  }) {
3552
3555
  const { tokens } = useSwypeConfig();
3553
3556
  const [hoveredId, setHoveredId] = react.useState(null);
@@ -3584,7 +3587,7 @@ function WalletPickerScreen({
3584
3587
  const selectedProvider = displayProviders.find((p) => p.id === selectedProviderId);
3585
3588
  if (loading) {
3586
3589
  return /* @__PURE__ */ jsxRuntime.jsxs(ScreenLayout, { children: [
3587
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Set up Swype", onBack }),
3590
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Set up Swype", onBack, onLogout }),
3588
3591
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { textAlign: "center", padding: "48px 0", flex: 1, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { label: "Connecting..." }) })
3589
3592
  ] });
3590
3593
  }
@@ -3614,7 +3617,7 @@ function WalletPickerScreen({
3614
3617
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
3615
3618
  ] }),
3616
3619
  children: [
3617
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Set up Swype", onBack }),
3620
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Set up Swype", onBack, onLogout }),
3618
3621
  hasPending && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3619
3622
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle4(tokens.text), children: "Continue where you left off" }),
3620
3623
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
@@ -3882,6 +3885,7 @@ function SetupScreen({
3882
3885
  availableBalance,
3883
3886
  onSetupOneTap,
3884
3887
  onBack,
3888
+ onLogout,
3885
3889
  onAdvanced,
3886
3890
  loading,
3887
3891
  error
@@ -3890,12 +3894,14 @@ function SetupScreen({
3890
3894
  const effectiveMax = DEFAULT_MAX;
3891
3895
  const effectiveMin = Math.min(ABSOLUTE_MIN, effectiveMax);
3892
3896
  const [limit, setLimit] = react.useState(() => Math.min(availableBalance, effectiveMax));
3897
+ const [activePreset, setActivePreset] = react.useState(null);
3893
3898
  const [editing, setEditing] = react.useState(false);
3894
3899
  const [inputValue, setInputValue] = react.useState("");
3895
3900
  const inputRef = react.useRef(null);
3896
3901
  const startEditing = react.useCallback(() => {
3897
3902
  setInputValue(limit.toFixed(2));
3898
3903
  setEditing(true);
3904
+ setActivePreset(null);
3899
3905
  requestAnimationFrame(() => inputRef.current?.focus());
3900
3906
  }, [limit]);
3901
3907
  const commitEdit = react.useCallback(() => {
@@ -3903,16 +3909,17 @@ function SetupScreen({
3903
3909
  if (!isNaN(parsed)) {
3904
3910
  setLimit(Math.min(effectiveMax, Math.max(effectiveMin, Math.round(parsed * 100) / 100)));
3905
3911
  }
3912
+ setActivePreset(null);
3906
3913
  setEditing(false);
3907
3914
  }, [inputValue, effectiveMax, effectiveMin]);
3908
3915
  const selectPreset = (value) => {
3909
3916
  setLimit(Math.min(value, effectiveMax));
3917
+ setActivePreset(value);
3910
3918
  };
3911
3919
  const selectMax = () => {
3912
3920
  setLimit(Math.min(availableBalance, effectiveMax));
3921
+ setActivePreset("max");
3913
3922
  };
3914
- const isPresetActive = (value) => Math.abs(limit - value) < 5e-3;
3915
- const isMaxActive = Math.abs(limit - Math.min(availableBalance, effectiveMax)) < 5e-3 && !PRESETS.some((p) => isPresetActive(p));
3916
3923
  return /* @__PURE__ */ jsxRuntime.jsxs(
3917
3924
  ScreenLayout,
3918
3925
  {
@@ -3929,7 +3936,7 @@ function SetupScreen({
3929
3936
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
3930
3937
  ] }),
3931
3938
  children: [
3932
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
3939
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack, onLogout }),
3933
3940
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle5(tokens.text), children: "Set Spending Limit" }),
3934
3941
  error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle3(tokens), children: error }),
3935
3942
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: amountRowStyle, children: [
@@ -3990,7 +3997,7 @@ function SetupScreen({
3990
3997
  {
3991
3998
  type: "button",
3992
3999
  onClick: () => selectPreset(value),
3993
- style: presetButtonStyle(tokens, isPresetActive(value)),
4000
+ style: presetButtonStyle(tokens, activePreset === value),
3994
4001
  children: [
3995
4002
  "$",
3996
4003
  value.toLocaleString()
@@ -4003,7 +4010,7 @@ function SetupScreen({
4003
4010
  {
4004
4011
  type: "button",
4005
4012
  onClick: selectMax,
4006
- style: presetButtonStyle(tokens, isMaxActive),
4013
+ style: presetButtonStyle(tokens, activePreset === "max"),
4007
4014
  children: "Max"
4008
4015
  }
4009
4016
  )
@@ -4128,7 +4135,7 @@ function SetupStatusScreen({
4128
4135
  { label: "Done", status: "pending" }
4129
4136
  ];
4130
4137
  return /* @__PURE__ */ jsxRuntime.jsxs(ScreenLayout, { children: [
4131
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) }),
4138
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onLogout }),
4132
4139
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle5, children: [
4133
4140
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 48 }),
4134
4141
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle6(tokens.text), children: "Setting up One-Tap..." }),
@@ -4217,7 +4224,7 @@ function DepositScreen({
4217
4224
  const { tokens } = useSwypeConfig();
4218
4225
  const amount = initialAmount;
4219
4226
  const isLowBalance = availableBalance < MIN_DEPOSIT;
4220
- const exceedsLimit = amount > remainingLimit && !isLowBalance;
4227
+ const exceedsLimit = remainingLimit != null && amount > remainingLimit && !isLowBalance;
4221
4228
  const canDeposit = amount >= MIN_DEPOSIT && !exceedsLimit && !isLowBalance && !processing;
4222
4229
  const headerTitle = merchantName ? `Deposit to ${merchantName}` : "Deposit";
4223
4230
  if (isLowBalance) {
@@ -4231,7 +4238,7 @@ function DepositScreen({
4231
4238
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
4232
4239
  ] }),
4233
4240
  children: [
4234
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: headerTitle, onBack, right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) }),
4241
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: headerTitle, onBack, onLogout }),
4235
4242
  /* @__PURE__ */ jsxRuntime.jsx(
4236
4243
  SourceCard,
4237
4244
  {
@@ -4288,7 +4295,7 @@ function DepositScreen({
4288
4295
  "Your deposit of $",
4289
4296
  amount.toFixed(2),
4290
4297
  " exceeds your One-Tap limit of $",
4291
- remainingLimit.toFixed(2),
4298
+ remainingLimit?.toFixed(2) ?? "0.00",
4292
4299
  ". Increase your limit to continue."
4293
4300
  ] })
4294
4301
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: () => onDeposit(amount), disabled: !canDeposit, loading: processing, children: "Confirm" }),
@@ -4296,7 +4303,20 @@ function DepositScreen({
4296
4303
  ] }),
4297
4304
  children: [
4298
4305
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
4299
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: mascotWrapStyle, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotStyle3 }) }),
4306
+ /* @__PURE__ */ jsxRuntime.jsx(
4307
+ SourceCard,
4308
+ {
4309
+ name: sourceName,
4310
+ address: sourceAddress,
4311
+ verified: sourceVerified,
4312
+ accounts,
4313
+ selectedAccountId,
4314
+ depositAmount: amount,
4315
+ onSelectAccount,
4316
+ onAuthorizeAccount,
4317
+ onAddProvider
4318
+ }
4319
+ ),
4300
4320
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: depositCardStyle(tokens), children: [
4301
4321
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: depositLabelStyle(tokens.textMuted), children: "Depositing" }),
4302
4322
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: amountRowStyle2, children: [
@@ -4335,7 +4355,7 @@ function DepositScreen({
4335
4355
  /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.4 }, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 10l5-5 5 5M7 14l5 5 5-5", stroke: tokens.textMuted, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
4336
4356
  ] })
4337
4357
  ] }),
4338
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: spendingLimitStyle(tokens.textMuted), children: [
4358
+ remainingLimit != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: spendingLimitStyle(tokens.textMuted), children: [
4339
4359
  "Spending Limit",
4340
4360
  " ",
4341
4361
  /* @__PURE__ */ jsxRuntime.jsxs("strong", { style: { color: tokens.text }, children: [
@@ -4348,15 +4368,6 @@ function DepositScreen({
4348
4368
  }
4349
4369
  );
4350
4370
  }
4351
- var mascotWrapStyle = {
4352
- display: "flex",
4353
- justifyContent: "center",
4354
- marginBottom: 16
4355
- };
4356
- var mascotStyle3 = {
4357
- width: 36,
4358
- height: 36
4359
- };
4360
4371
  var depositCardStyle = (tokens) => ({
4361
4372
  background: tokens.bgInput,
4362
4373
  border: `1px solid ${tokens.border}`,
@@ -4548,12 +4559,7 @@ function SuccessScreen({
4548
4559
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
4549
4560
  ] }),
4550
4561
  children: [
4551
- /* @__PURE__ */ jsxRuntime.jsx(
4552
- ScreenHeader,
4553
- {
4554
- right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout })
4555
- }
4556
- ),
4562
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onLogout }),
4557
4563
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle6, children: [
4558
4564
  succeeded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4559
4565
  /* @__PURE__ */ jsxRuntime.jsx(IconCircle, { variant: "success", size: 64, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: tokens.success }) }) }),
@@ -4720,7 +4726,7 @@ function SelectSourceScreen({
4720
4726
  {
4721
4727
  title: "Select Source",
4722
4728
  onBack,
4723
- right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout })
4729
+ onLogout
4724
4730
  }
4725
4731
  ),
4726
4732
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle5(tokens.textMuted), children: "Choose which chain and token to pay from." }),
@@ -5087,12 +5093,13 @@ function buildSteps(phase) {
5087
5093
  }
5088
5094
  function TransferStatusScreen({
5089
5095
  phase,
5090
- error
5096
+ error,
5097
+ onLogout
5091
5098
  }) {
5092
5099
  const { tokens } = useSwypeConfig();
5093
5100
  const steps = buildSteps(phase);
5094
5101
  return /* @__PURE__ */ jsxRuntime.jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {}), children: [
5095
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, {}),
5102
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onLogout }),
5096
5103
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle7, children: [
5097
5104
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 64 }),
5098
5105
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle9(tokens.text), children: "Depositing your money..." }),
@@ -5161,6 +5168,7 @@ function OpenWalletScreen({
5161
5168
  walletName,
5162
5169
  deeplinkUri,
5163
5170
  loading,
5171
+ useDeeplink = true,
5164
5172
  error,
5165
5173
  onRetryStatus,
5166
5174
  onBack,
@@ -5171,16 +5179,44 @@ function OpenWalletScreen({
5171
5179
  const logoSrc = walletName ? KNOWN_LOGOS[walletName.toLowerCase()] : void 0;
5172
5180
  const autoOpenedRef = react.useRef(null);
5173
5181
  react.useEffect(() => {
5174
- if (loading || !deeplinkUri || autoOpenedRef.current === deeplinkUri) return;
5182
+ if (!useDeeplink || loading || !deeplinkUri || autoOpenedRef.current === deeplinkUri) return;
5175
5183
  autoOpenedRef.current = deeplinkUri;
5176
5184
  triggerDeeplink(deeplinkUri);
5177
- }, [loading, deeplinkUri]);
5185
+ }, [useDeeplink, loading, deeplinkUri]);
5178
5186
  const handleOpen = react.useCallback(() => {
5179
5187
  const opened = window.open(deeplinkUri, "_blank");
5180
5188
  if (!opened && window === window.parent) {
5181
5189
  window.location.href = deeplinkUri;
5182
5190
  }
5183
5191
  }, [deeplinkUri]);
5192
+ if (!useDeeplink) {
5193
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5194
+ ScreenLayout,
5195
+ {
5196
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: footerContentStyle, children: [
5197
+ error && /* @__PURE__ */ jsxRuntime.jsx(InfoBanner, { children: error }),
5198
+ /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
5199
+ ] }),
5200
+ children: [
5201
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onLogout }),
5202
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle8, children: [
5203
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 32 }) }),
5204
+ /* @__PURE__ */ jsxRuntime.jsxs("h2", { style: headingStyle10(tokens.text), children: [
5205
+ "Setting up ",
5206
+ displayName,
5207
+ "..."
5208
+ ] }),
5209
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Approve the connection in your wallet extension." }),
5210
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: waitingBadgeStyle(tokens), children: [
5211
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 14 }),
5212
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Waiting for authorization..." })
5213
+ ] }),
5214
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: waitHintStyle2(tokens.textMuted), children: "Usually takes a few seconds" })
5215
+ ] })
5216
+ ]
5217
+ }
5218
+ );
5219
+ }
5184
5220
  return /* @__PURE__ */ jsxRuntime.jsxs(
5185
5221
  ScreenLayout,
5186
5222
  {
@@ -5195,7 +5231,7 @@ function OpenWalletScreen({
5195
5231
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
5196
5232
  ] }),
5197
5233
  children: [
5198
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack, right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) }),
5234
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack, onLogout }),
5199
5235
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle8, children: [
5200
5236
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 32 }) }),
5201
5237
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
@@ -5270,6 +5306,11 @@ var hintStyle = (color) => ({
5270
5306
  color,
5271
5307
  margin: "8px 0 0"
5272
5308
  });
5309
+ var waitHintStyle2 = (color) => ({
5310
+ fontSize: "0.82rem",
5311
+ color,
5312
+ margin: "16px 0 0"
5313
+ });
5273
5314
  function ConfirmSignScreen({
5274
5315
  walletName,
5275
5316
  signing,
@@ -5289,7 +5330,7 @@ function ConfirmSignScreen({
5289
5330
  !error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle2(tokens.textMuted), children: "You may be prompted for biometric verification" })
5290
5331
  ] }),
5291
5332
  children: [
5292
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) }),
5333
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onLogout }),
5293
5334
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle9, children: [
5294
5335
  logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 48 }),
5295
5336
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
@@ -5368,6 +5409,7 @@ function TokenPickerScreen({
5368
5409
  onSelectAuthorized,
5369
5410
  onAuthorizeToken,
5370
5411
  onBack,
5412
+ onLogout,
5371
5413
  depositAmount
5372
5414
  }) {
5373
5415
  const { tokens: t } = useSwypeConfig();
@@ -5396,8 +5438,8 @@ function TokenPickerScreen({
5396
5438
  }
5397
5439
  };
5398
5440
  return /* @__PURE__ */ jsxRuntime.jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {}), children: [
5399
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
5400
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: mascotWrapStyle2, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotImgStyle }) }),
5441
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack, onLogout }),
5442
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: mascotWrapStyle, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotImgStyle }) }),
5401
5443
  depositAmount != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: depositCardStyle2(t), children: [
5402
5444
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: depositLabelStyle2(t.textMuted), children: "Depositing" }),
5403
5445
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: depositAmountRowStyle, children: [
@@ -5450,7 +5492,7 @@ function TokenPickerScreen({
5450
5492
  }) })
5451
5493
  ] });
5452
5494
  }
5453
- var mascotWrapStyle2 = {
5495
+ var mascotWrapStyle = {
5454
5496
  display: "flex",
5455
5497
  justifyContent: "center",
5456
5498
  marginBottom: 16
@@ -5701,6 +5743,7 @@ function StepRendererContent({
5701
5743
  {
5702
5744
  onCreatePasskey: handlers.onRegisterPasskey,
5703
5745
  onBack: handlers.onLogout,
5746
+ onLogout: handlers.onLogout,
5704
5747
  creating: state.registeringPasskey,
5705
5748
  error: state.error,
5706
5749
  popupFallback: state.passkeyPopupNeeded,
@@ -5714,6 +5757,7 @@ function StepRendererContent({
5714
5757
  {
5715
5758
  onCreatePasskey: handlers.onRegisterPasskey,
5716
5759
  onBack: handlers.onLogout,
5760
+ onLogout: handlers.onLogout,
5717
5761
  creating: state.verifyingPasskeyPopup,
5718
5762
  error: state.error,
5719
5763
  popupFallback: true,
@@ -5734,21 +5778,26 @@ function StepRendererContent({
5734
5778
  onPrepareProvider: handlers.onPrepareProvider,
5735
5779
  onSelectProvider: handlers.onSelectProvider,
5736
5780
  onContinueConnection: handlers.onContinueConnection,
5737
- onBack: () => handlers.onNavigate(state.activeCredentialId ? "deposit" : "create-passkey")
5781
+ onBack: () => handlers.onNavigate(state.activeCredentialId ? "deposit" : "create-passkey"),
5782
+ onLogout: handlers.onLogout
5738
5783
  }
5739
5784
  );
5740
5785
  }
5741
5786
  if (step === "open-wallet") {
5742
5787
  const providerName = state.providers.find((p) => p.id === state.selectedProviderId)?.name ?? null;
5788
+ const useDeeplink = !shouldUseWalletConnector({
5789
+ userAgent: typeof navigator === "undefined" ? void 0 : navigator.userAgent
5790
+ });
5743
5791
  return /* @__PURE__ */ jsxRuntime.jsx(
5744
5792
  OpenWalletScreen,
5745
5793
  {
5746
5794
  walletName: providerName,
5747
5795
  deeplinkUri: state.deeplinkUri ?? "",
5748
- loading: state.creatingTransfer || !state.deeplinkUri,
5749
- error: state.error || pollingError,
5750
- onRetryStatus: handlers.onRetryMobileStatus,
5751
- onBack: () => handlers.onNavigate("wallet-picker"),
5796
+ loading: useDeeplink ? state.creatingTransfer || !state.deeplinkUri : state.creatingTransfer,
5797
+ useDeeplink,
5798
+ error: state.error || (useDeeplink ? pollingError : authExecutorError),
5799
+ onRetryStatus: useDeeplink ? handlers.onRetryMobileStatus : void 0,
5800
+ onBack: useDeeplink ? () => handlers.onNavigate("wallet-picker") : void 0,
5752
5801
  onLogout: handlers.onLogout
5753
5802
  }
5754
5803
  );
@@ -5816,7 +5865,7 @@ function StepRendererContent({
5816
5865
  sourceAddress,
5817
5866
  sourceVerified,
5818
5867
  availableBalance: selectedSource ? selectedSource.balance.available.amount : selectedAccount ? selectedAccount.wallets.reduce((sum, w) => sum + w.balance.available.amount, 0) : maxSourceBalance,
5819
- remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? state.oneTapLimit,
5868
+ remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? null,
5820
5869
  tokenCount,
5821
5870
  initialAmount: parsedAmt,
5822
5871
  processing: state.creatingTransfer,
@@ -5849,6 +5898,7 @@ function StepRendererContent({
5849
5898
  onSelectAuthorized: handlers.onSelectAuthorizedToken,
5850
5899
  onAuthorizeToken: handlers.onAuthorizeToken,
5851
5900
  onBack: () => handlers.onNavigate(state.previousStep === "setup" ? "setup" : "deposit"),
5901
+ onLogout: handlers.onLogout,
5852
5902
  depositAmount: depositAmount ?? void 0
5853
5903
  }
5854
5904
  );
@@ -5896,7 +5946,8 @@ function StepRendererContent({
5896
5946
  merchantName,
5897
5947
  sourceName,
5898
5948
  remainingLimit: succeeded ? (() => {
5899
- const limit = selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? state.oneTapLimit;
5949
+ const limit = selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? null;
5950
+ if (limit == null) return null;
5900
5951
  return limit > displayAmount ? limit - displayAmount : 0;
5901
5952
  })() : void 0,
5902
5953
  onDone: onDismiss ?? handlers.onNewPayment,
@@ -5914,7 +5965,7 @@ function StepRendererContent({
5914
5965
  sourceAddress,
5915
5966
  sourceVerified,
5916
5967
  availableBalance: 0,
5917
- remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? state.oneTapLimit,
5968
+ remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? null,
5918
5969
  tokenCount,
5919
5970
  initialAmount: depositAmount ?? 5,
5920
5971
  processing: false,
@@ -6705,7 +6756,7 @@ function useProviderHandlers(deps) {
6705
6756
  });
6706
6757
  if (!isMobile) {
6707
6758
  dispatch({ type: "PAY_STARTED", isSetupRedirect: false });
6708
- dispatch({ type: "NAVIGATE", step: "setup-status" });
6759
+ dispatch({ type: "NAVIGATE", step: "open-wallet" });
6709
6760
  }
6710
6761
  try {
6711
6762
  let accountId;
@@ -6860,7 +6911,7 @@ function useProviderHandlers(deps) {
6860
6911
  dispatch({ type: "MOBILE_DEEPLINK_READY", deeplinkUri: session.uri });
6861
6912
  triggerDeeplink(session.uri);
6862
6913
  } else {
6863
- dispatch({ type: "NAVIGATE", step: "setup-status" });
6914
+ dispatch({ type: "NAVIGATE", step: "open-wallet" });
6864
6915
  await authExecutor.executeSessionById(session.id);
6865
6916
  await reloadAccounts();
6866
6917
  dispatch({ type: "NAVIGATE", step: "deposit" });
@@ -6953,7 +7004,7 @@ function useProviderHandlers(deps) {
6953
7004
  dispatch({ type: "MOBILE_DEEPLINK_READY", deeplinkUri: session.uri });
6954
7005
  triggerDeeplink(session.uri);
6955
7006
  } else {
6956
- dispatch({ type: "NAVIGATE", step: "setup-status" });
7007
+ dispatch({ type: "NAVIGATE", step: "open-wallet" });
6957
7008
  await authExecutor.executeSessionById(session.id);
6958
7009
  await reloadAccounts();
6959
7010
  dispatch({ type: "SELECT_TOKEN", walletId: _walletId, tokenSymbol });
@@ -7028,7 +7079,7 @@ function useOneTapSetupHandlers(deps) {
7028
7079
  }
7029
7080
  oneTapLimitSavedDuringSetupRef.current = true;
7030
7081
  authExecutor.resolveSelectSource({ chainName, tokenSymbol });
7031
- dispatch({ type: "NAVIGATE", step: "setup-status" });
7082
+ dispatch({ type: "NAVIGATE", step: "open-wallet" });
7032
7083
  } else if (authExecutor.pendingOneTapSetup) {
7033
7084
  authExecutor.resolveOneTapSetup();
7034
7085
  } else {
@@ -7666,7 +7717,7 @@ function usePaymentEffects(deps) {
7666
7717
  useWalletConnector: useWalletConnectorProp,
7667
7718
  userAgent: typeof navigator === "undefined" ? void 0 : navigator.userAgent
7668
7719
  });
7669
- if (isDesktop && state.step === "setup-status") {
7720
+ if (isDesktop && (state.step === "setup-status" || state.step === "open-wallet")) {
7670
7721
  preSelectSourceStepRef.current = state.step;
7671
7722
  dispatch({ type: "NAVIGATE", step: "setup" });
7672
7723
  return;
@@ -7681,7 +7732,7 @@ function usePaymentEffects(deps) {
7681
7732
  const pendingOneTapSetupAction = authExecutor.pendingOneTapSetup;
7682
7733
  const preOneTapSetupStepRef = react.useRef(null);
7683
7734
  react.useEffect(() => {
7684
- if (pendingOneTapSetupAction && state.step === "setup-status") {
7735
+ if (pendingOneTapSetupAction && (state.step === "setup-status" || state.step === "open-wallet")) {
7685
7736
  if (oneTapLimitSavedDuringSetupRef.current) {
7686
7737
  oneTapLimitSavedDuringSetupRef.current = false;
7687
7738
  authExecutor.resolveOneTapSetup();