@swype-org/react-sdk 0.1.183 → 0.1.189
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 +345 -580
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +345 -580
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2321,16 +2321,98 @@ var mascotStyle = {
|
|
|
2321
2321
|
width: 28,
|
|
2322
2322
|
height: 28
|
|
2323
2323
|
};
|
|
2324
|
-
function
|
|
2324
|
+
function SettingsMenu({ onLogout }) {
|
|
2325
|
+
const { tokens } = useSwypeConfig();
|
|
2326
|
+
const [open, setOpen] = useState(false);
|
|
2327
|
+
const menuRef = useRef(null);
|
|
2328
|
+
const toggle = useCallback(() => setOpen((prev) => !prev), []);
|
|
2329
|
+
useEffect(() => {
|
|
2330
|
+
if (!open) return;
|
|
2331
|
+
const handleClickOutside = (e) => {
|
|
2332
|
+
if (menuRef.current && !menuRef.current.contains(e.target)) {
|
|
2333
|
+
setOpen(false);
|
|
2334
|
+
}
|
|
2335
|
+
};
|
|
2336
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2337
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
2338
|
+
}, [open]);
|
|
2339
|
+
return /* @__PURE__ */ jsxs("div", { ref: menuRef, style: containerStyle4, children: [
|
|
2340
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: toggle, style: triggerStyle(tokens.text), "aria-label": "Settings", children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: [
|
|
2341
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "2", fill: "currentColor" }),
|
|
2342
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
|
|
2343
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "19", r: "2", fill: "currentColor" })
|
|
2344
|
+
] }) }),
|
|
2345
|
+
open && /* @__PURE__ */ jsx("div", { style: dropdownStyle(tokens), children: /* @__PURE__ */ jsxs(
|
|
2346
|
+
"button",
|
|
2347
|
+
{
|
|
2348
|
+
type: "button",
|
|
2349
|
+
onClick: () => {
|
|
2350
|
+
setOpen(false);
|
|
2351
|
+
onLogout();
|
|
2352
|
+
},
|
|
2353
|
+
style: menuItemStyle(tokens),
|
|
2354
|
+
children: [
|
|
2355
|
+
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 8, flexShrink: 0 }, children: [
|
|
2356
|
+
/* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
2357
|
+
/* @__PURE__ */ jsx("polyline", { points: "16 17 21 12 16 7", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
2358
|
+
/* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
2359
|
+
] }),
|
|
2360
|
+
"Log out"
|
|
2361
|
+
]
|
|
2362
|
+
}
|
|
2363
|
+
) })
|
|
2364
|
+
] });
|
|
2365
|
+
}
|
|
2366
|
+
var containerStyle4 = {
|
|
2367
|
+
position: "relative"
|
|
2368
|
+
};
|
|
2369
|
+
var triggerStyle = (color) => ({
|
|
2370
|
+
background: "transparent",
|
|
2371
|
+
border: "none",
|
|
2372
|
+
cursor: "pointer",
|
|
2373
|
+
padding: 4,
|
|
2374
|
+
color,
|
|
2375
|
+
display: "flex",
|
|
2376
|
+
alignItems: "center",
|
|
2377
|
+
justifyContent: "center"
|
|
2378
|
+
});
|
|
2379
|
+
var dropdownStyle = (tokens) => ({
|
|
2380
|
+
position: "absolute",
|
|
2381
|
+
right: 0,
|
|
2382
|
+
top: "100%",
|
|
2383
|
+
marginTop: 4,
|
|
2384
|
+
minWidth: 140,
|
|
2385
|
+
background: tokens.bgCard,
|
|
2386
|
+
border: `1px solid ${tokens.border}`,
|
|
2387
|
+
borderRadius: 12,
|
|
2388
|
+
boxShadow: tokens.shadow,
|
|
2389
|
+
zIndex: 100,
|
|
2390
|
+
overflow: "hidden"
|
|
2391
|
+
});
|
|
2392
|
+
var menuItemStyle = (tokens) => ({
|
|
2393
|
+
width: "100%",
|
|
2394
|
+
display: "flex",
|
|
2395
|
+
alignItems: "center",
|
|
2396
|
+
padding: "12px 16px",
|
|
2397
|
+
background: "transparent",
|
|
2398
|
+
border: "none",
|
|
2399
|
+
cursor: "pointer",
|
|
2400
|
+
fontFamily: "inherit",
|
|
2401
|
+
fontSize: "0.85rem",
|
|
2402
|
+
fontWeight: 500,
|
|
2403
|
+
color: tokens.error
|
|
2404
|
+
});
|
|
2405
|
+
function ScreenHeader({ title, right, onBack, badge, onLogout }) {
|
|
2325
2406
|
const { tokens } = useSwypeConfig();
|
|
2326
2407
|
const flowPhase = useFlowPhase();
|
|
2408
|
+
const rightContent = onLogout ? /* @__PURE__ */ jsx(SettingsMenu, { onLogout }) : right;
|
|
2327
2409
|
return /* @__PURE__ */ jsxs("div", { style: headerStyle, children: [
|
|
2328
2410
|
/* @__PURE__ */ jsx("div", { style: leftSlotStyle, children: onBack && /* @__PURE__ */ jsx("button", { type: "button", onClick: onBack, style: backButtonStyle(tokens.text), "aria-label": "Go back", children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M15 18l-6-6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) }),
|
|
2329
2411
|
/* @__PURE__ */ jsx("div", { style: centerSlotStyle, children: flowPhase ? /* @__PURE__ */ jsx(StepProgress, { phase: flowPhase }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2330
2412
|
title && /* @__PURE__ */ jsx("span", { style: titleStyle(tokens.text), children: title }),
|
|
2331
2413
|
badge && /* @__PURE__ */ jsx("span", { style: badgeStyle(tokens.textMuted), children: badge })
|
|
2332
2414
|
] }) }),
|
|
2333
|
-
/* @__PURE__ */ jsx("div", { style: rightSlotStyle, children:
|
|
2415
|
+
/* @__PURE__ */ jsx("div", { style: rightSlotStyle, children: rightContent })
|
|
2334
2416
|
] });
|
|
2335
2417
|
}
|
|
2336
2418
|
var headerStyle = {
|
|
@@ -2371,7 +2453,7 @@ var badgeStyle = (color) => ({
|
|
|
2371
2453
|
});
|
|
2372
2454
|
function PoweredByFooter() {
|
|
2373
2455
|
const { tokens } = useSwypeConfig();
|
|
2374
|
-
return /* @__PURE__ */ jsxs("div", { style:
|
|
2456
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle5(tokens.textMuted), children: [
|
|
2375
2457
|
/* @__PURE__ */ jsxs("div", { style: rowStyle, children: [
|
|
2376
2458
|
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
2377
2459
|
"path",
|
|
@@ -2385,7 +2467,7 @@ function PoweredByFooter() {
|
|
|
2385
2467
|
/* @__PURE__ */ jsx("span", { style: pillStyle(tokens.textMuted, tokens.border), children: "Beta Version" })
|
|
2386
2468
|
] });
|
|
2387
2469
|
}
|
|
2388
|
-
var
|
|
2470
|
+
var containerStyle5 = (color) => ({
|
|
2389
2471
|
display: "flex",
|
|
2390
2472
|
flexDirection: "column",
|
|
2391
2473
|
alignItems: "center",
|
|
@@ -2484,12 +2566,12 @@ var defaultIcon = /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBo
|
|
|
2484
2566
|
) });
|
|
2485
2567
|
function InfoBanner({ children, icon }) {
|
|
2486
2568
|
const { tokens } = useSwypeConfig();
|
|
2487
|
-
return /* @__PURE__ */ jsxs("div", { style:
|
|
2569
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle6(tokens.accent), children: [
|
|
2488
2570
|
/* @__PURE__ */ jsx("span", { style: iconStyle, children: icon ?? defaultIcon }),
|
|
2489
2571
|
/* @__PURE__ */ jsx("span", { style: textStyle, children })
|
|
2490
2572
|
] });
|
|
2491
2573
|
}
|
|
2492
|
-
var
|
|
2574
|
+
var containerStyle6 = (accent) => ({
|
|
2493
2575
|
display: "flex",
|
|
2494
2576
|
alignItems: "flex-start",
|
|
2495
2577
|
gap: 10,
|
|
@@ -2507,7 +2589,7 @@ var iconStyle = {
|
|
|
2507
2589
|
};
|
|
2508
2590
|
var textStyle = { flex: 1 };
|
|
2509
2591
|
function WarningBanner({ title, children }) {
|
|
2510
|
-
return /* @__PURE__ */ jsxs("div", { style:
|
|
2592
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle7, children: [
|
|
2511
2593
|
/* @__PURE__ */ jsxs("div", { style: headerStyle2, children: [
|
|
2512
2594
|
/* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", style: iconStyle2, children: /* @__PURE__ */ jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z", fill: "#F57C00" }) }),
|
|
2513
2595
|
/* @__PURE__ */ jsx("strong", { children: title })
|
|
@@ -2515,7 +2597,7 @@ function WarningBanner({ title, children }) {
|
|
|
2515
2597
|
/* @__PURE__ */ jsx("div", { style: bodyStyle2, children })
|
|
2516
2598
|
] });
|
|
2517
2599
|
}
|
|
2518
|
-
var
|
|
2600
|
+
var containerStyle7 = {
|
|
2519
2601
|
padding: "14px 16px",
|
|
2520
2602
|
background: "#FFF8E1",
|
|
2521
2603
|
border: "1px solid #FFE082",
|
|
@@ -2594,7 +2676,7 @@ function OtpInput({ value, onChange, length = 6, disabled }) {
|
|
|
2594
2676
|
onChange(pasted);
|
|
2595
2677
|
focusInput(Math.min(pasted.length, length - 1));
|
|
2596
2678
|
}, [onChange, length, focusInput]);
|
|
2597
|
-
return /* @__PURE__ */ jsx("div", { style:
|
|
2679
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle8, children: digits.map((digit, i) => /* @__PURE__ */ jsx(
|
|
2598
2680
|
"input",
|
|
2599
2681
|
{
|
|
2600
2682
|
ref: (el) => {
|
|
@@ -2615,7 +2697,7 @@ function OtpInput({ value, onChange, length = 6, disabled }) {
|
|
|
2615
2697
|
i
|
|
2616
2698
|
)) });
|
|
2617
2699
|
}
|
|
2618
|
-
var
|
|
2700
|
+
var containerStyle8 = {
|
|
2619
2701
|
display: "flex",
|
|
2620
2702
|
gap: 8,
|
|
2621
2703
|
justifyContent: "center",
|
|
@@ -2629,365 +2711,14 @@ var inputStyle = (tokens, filled) => ({
|
|
|
2629
2711
|
borderRadius: 12,
|
|
2630
2712
|
border: `1.5px solid ${filled ? tokens.borderFocus : tokens.border}`,
|
|
2631
2713
|
background: tokens.bgInput,
|
|
2632
|
-
color: tokens.text,
|
|
2633
|
-
fontSize: "1.25rem",
|
|
2634
|
-
fontWeight: 600,
|
|
2635
|
-
fontFamily: "inherit",
|
|
2636
|
-
textAlign: "center",
|
|
2637
|
-
outline: "none",
|
|
2638
|
-
caretColor: tokens.borderFocus,
|
|
2639
|
-
transition: "border-color 0.15s ease"
|
|
2640
|
-
});
|
|
2641
|
-
function SourceCard({
|
|
2642
|
-
name,
|
|
2643
|
-
address,
|
|
2644
|
-
verified,
|
|
2645
|
-
accounts,
|
|
2646
|
-
selectedAccountId,
|
|
2647
|
-
depositAmount,
|
|
2648
|
-
onSelectAccount,
|
|
2649
|
-
onAuthorizeAccount,
|
|
2650
|
-
onAddProvider
|
|
2651
|
-
}) {
|
|
2652
|
-
const { tokens } = useSwypeConfig();
|
|
2653
|
-
const [open, setOpen] = useState(false);
|
|
2654
|
-
const containerRef = useRef(null);
|
|
2655
|
-
const hasDropdown = accounts != null && accounts.length > 0;
|
|
2656
|
-
useEffect(() => {
|
|
2657
|
-
if (!open) return;
|
|
2658
|
-
const handleClick = (e) => {
|
|
2659
|
-
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
2660
|
-
setOpen(false);
|
|
2661
|
-
}
|
|
2662
|
-
};
|
|
2663
|
-
document.addEventListener("mousedown", handleClick);
|
|
2664
|
-
return () => document.removeEventListener("mousedown", handleClick);
|
|
2665
|
-
}, [open]);
|
|
2666
|
-
return /* @__PURE__ */ jsxs("div", { ref: containerRef, style: { position: "relative" }, children: [
|
|
2667
|
-
/* @__PURE__ */ jsxs("div", { style: cardContainerStyle(tokens), children: [
|
|
2668
|
-
/* @__PURE__ */ jsxs("div", { style: leftStyle, children: [
|
|
2669
|
-
KNOWN_LOGOS[name.toLowerCase()] ? /* @__PURE__ */ jsx(
|
|
2670
|
-
"img",
|
|
2671
|
-
{
|
|
2672
|
-
src: KNOWN_LOGOS[name.toLowerCase()],
|
|
2673
|
-
alt: name,
|
|
2674
|
-
style: logoImgStyle
|
|
2675
|
-
}
|
|
2676
|
-
) : /* @__PURE__ */ jsx("div", { style: iconStyle3(tokens.textMuted), children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
2677
|
-
"path",
|
|
2678
|
-
{
|
|
2679
|
-
d: "M21 7H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H3V9h18v6z",
|
|
2680
|
-
fill: "currentColor"
|
|
2681
|
-
}
|
|
2682
|
-
) }) }),
|
|
2683
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
2684
|
-
/* @__PURE__ */ jsxs("div", { style: nameRowStyle, children: [
|
|
2685
|
-
/* @__PURE__ */ jsx("span", { style: nameStyle(tokens.text), children: name }),
|
|
2686
|
-
verified && /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: tokens.accent }) })
|
|
2687
|
-
] }),
|
|
2688
|
-
address && /* @__PURE__ */ jsx("span", { style: addressStyle(tokens.textMuted), children: address })
|
|
2689
|
-
] })
|
|
2690
|
-
] }),
|
|
2691
|
-
hasDropdown && /* @__PURE__ */ jsxs(
|
|
2692
|
-
"button",
|
|
2693
|
-
{
|
|
2694
|
-
type: "button",
|
|
2695
|
-
onClick: () => setOpen(!open),
|
|
2696
|
-
style: changeStyle(tokens.accent),
|
|
2697
|
-
children: [
|
|
2698
|
-
"Change source",
|
|
2699
|
-
/* @__PURE__ */ jsx(
|
|
2700
|
-
"svg",
|
|
2701
|
-
{
|
|
2702
|
-
width: "10",
|
|
2703
|
-
height: "10",
|
|
2704
|
-
viewBox: "0 0 24 24",
|
|
2705
|
-
fill: "none",
|
|
2706
|
-
style: {
|
|
2707
|
-
marginLeft: 4,
|
|
2708
|
-
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
2709
|
-
transition: "transform 0.15s ease"
|
|
2710
|
-
},
|
|
2711
|
-
children: /* @__PURE__ */ jsx(
|
|
2712
|
-
"path",
|
|
2713
|
-
{
|
|
2714
|
-
d: "M7 10l5 5 5-5",
|
|
2715
|
-
stroke: tokens.accent,
|
|
2716
|
-
strokeWidth: "2.5",
|
|
2717
|
-
strokeLinecap: "round",
|
|
2718
|
-
strokeLinejoin: "round"
|
|
2719
|
-
}
|
|
2720
|
-
)
|
|
2721
|
-
}
|
|
2722
|
-
)
|
|
2723
|
-
]
|
|
2724
|
-
}
|
|
2725
|
-
)
|
|
2726
|
-
] }),
|
|
2727
|
-
open && hasDropdown && /* @__PURE__ */ jsxs("div", { style: dropdownStyle(tokens), children: [
|
|
2728
|
-
accounts.map((account) => {
|
|
2729
|
-
const preferredWallet = getPreferredDepositWallet(account, depositAmount ?? 0);
|
|
2730
|
-
const active = hasActiveDepositWallet(account);
|
|
2731
|
-
const isSelected = account.id === selectedAccountId;
|
|
2732
|
-
const displayName = account.nickname ?? account.name;
|
|
2733
|
-
const walletAddress = preferredWallet ? getWalletAddress(preferredWallet) : null;
|
|
2734
|
-
const hasAllowance = active && account.remainingAllowance != null;
|
|
2735
|
-
const exceedsLimit = hasAllowance && depositAmount != null && depositAmount > account.remainingAllowance;
|
|
2736
|
-
return /* @__PURE__ */ jsxs(
|
|
2737
|
-
"button",
|
|
2738
|
-
{
|
|
2739
|
-
type: "button",
|
|
2740
|
-
onClick: () => {
|
|
2741
|
-
if (active) {
|
|
2742
|
-
onSelectAccount?.(account.id);
|
|
2743
|
-
} else {
|
|
2744
|
-
onAuthorizeAccount?.(account.id);
|
|
2745
|
-
}
|
|
2746
|
-
setOpen(false);
|
|
2747
|
-
},
|
|
2748
|
-
style: dropdownRowStyle(tokens, active, isSelected),
|
|
2749
|
-
children: [
|
|
2750
|
-
/* @__PURE__ */ jsxs("div", { style: dropdownRowLeftStyle, children: [
|
|
2751
|
-
KNOWN_LOGOS[account.name.toLowerCase()] ? /* @__PURE__ */ jsx(
|
|
2752
|
-
"img",
|
|
2753
|
-
{
|
|
2754
|
-
src: KNOWN_LOGOS[account.name.toLowerCase()],
|
|
2755
|
-
alt: account.name,
|
|
2756
|
-
style: dropdownLogoStyle
|
|
2757
|
-
}
|
|
2758
|
-
) : /* @__PURE__ */ jsx("div", { style: dropdownFallbackIconStyle(active ? tokens.textMuted : tokens.border), children: account.name.charAt(0) }),
|
|
2759
|
-
/* @__PURE__ */ jsxs("div", { style: dropdownNameColumnStyle, children: [
|
|
2760
|
-
/* @__PURE__ */ jsx("span", { style: dropdownNameStyle(active ? tokens.text : tokens.textMuted), children: displayName }),
|
|
2761
|
-
walletAddress && /* @__PURE__ */ jsx("span", { style: dropdownAddressStyle(active ? tokens.textMuted : tokens.border), children: walletAddress }),
|
|
2762
|
-
hasAllowance && /* @__PURE__ */ jsxs("span", { style: remainingAllowanceStyle(exceedsLimit ? tokens.warning : tokens.textMuted), children: [
|
|
2763
|
-
"$",
|
|
2764
|
-
account.remainingAllowance.toFixed(2),
|
|
2765
|
-
" remaining"
|
|
2766
|
-
] })
|
|
2767
|
-
] })
|
|
2768
|
-
] }),
|
|
2769
|
-
/* @__PURE__ */ jsx("div", { style: dropdownRowRightStyle, children: active ? exceedsLimit ? /* @__PURE__ */ jsx("span", { style: exceedsLimitBadgeStyle(tokens), children: "Exceeds limit" }) : /* @__PURE__ */ jsx("span", { style: activeBadgeStyle(tokens), children: "Active" }) : /* @__PURE__ */ jsx("span", { style: inactiveBadgeStyle(tokens), children: "Setup incomplete" }) })
|
|
2770
|
-
]
|
|
2771
|
-
},
|
|
2772
|
-
account.id
|
|
2773
|
-
);
|
|
2774
|
-
}),
|
|
2775
|
-
onAddProvider && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2776
|
-
/* @__PURE__ */ jsx("div", { style: dropdownDividerStyle(tokens.border) }),
|
|
2777
|
-
/* @__PURE__ */ jsxs(
|
|
2778
|
-
"button",
|
|
2779
|
-
{
|
|
2780
|
-
type: "button",
|
|
2781
|
-
onClick: () => {
|
|
2782
|
-
onAddProvider();
|
|
2783
|
-
setOpen(false);
|
|
2784
|
-
},
|
|
2785
|
-
style: addProviderStyle(tokens),
|
|
2786
|
-
children: [
|
|
2787
|
-
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }) }),
|
|
2788
|
-
"Add Account"
|
|
2789
|
-
]
|
|
2790
|
-
}
|
|
2791
|
-
)
|
|
2792
|
-
] })
|
|
2793
|
-
] })
|
|
2794
|
-
] });
|
|
2795
|
-
}
|
|
2796
|
-
var cardContainerStyle = (tokens) => ({
|
|
2797
|
-
display: "flex",
|
|
2798
|
-
alignItems: "center",
|
|
2799
|
-
justifyContent: "space-between",
|
|
2800
|
-
padding: "12px 16px",
|
|
2801
|
-
background: tokens.bgInput,
|
|
2802
|
-
border: `1px solid ${tokens.border}`,
|
|
2803
|
-
borderRadius: 16
|
|
2804
|
-
});
|
|
2805
|
-
var leftStyle = {
|
|
2806
|
-
display: "flex",
|
|
2807
|
-
alignItems: "center",
|
|
2808
|
-
gap: 10
|
|
2809
|
-
};
|
|
2810
|
-
var logoImgStyle = {
|
|
2811
|
-
width: 20,
|
|
2812
|
-
height: 20,
|
|
2813
|
-
borderRadius: "50%",
|
|
2814
|
-
objectFit: "contain"
|
|
2815
|
-
};
|
|
2816
|
-
var iconStyle3 = (color) => ({
|
|
2817
|
-
color,
|
|
2818
|
-
display: "flex",
|
|
2819
|
-
alignItems: "center"
|
|
2820
|
-
});
|
|
2821
|
-
var nameRowStyle = {
|
|
2822
|
-
display: "flex",
|
|
2823
|
-
alignItems: "center",
|
|
2824
|
-
gap: 4
|
|
2825
|
-
};
|
|
2826
|
-
var nameStyle = (color) => ({
|
|
2827
|
-
fontWeight: 600,
|
|
2828
|
-
fontSize: "0.9rem",
|
|
2829
|
-
color
|
|
2830
|
-
});
|
|
2831
|
-
var addressStyle = (color) => ({
|
|
2832
|
-
fontSize: "0.72rem",
|
|
2833
|
-
color,
|
|
2834
|
-
fontFamily: '"SF Mono", "Fira Code", monospace'
|
|
2835
|
-
});
|
|
2836
|
-
var changeStyle = (color) => ({
|
|
2837
|
-
display: "flex",
|
|
2838
|
-
alignItems: "center",
|
|
2839
|
-
background: "transparent",
|
|
2840
|
-
border: "none",
|
|
2841
|
-
color,
|
|
2842
|
-
fontWeight: 600,
|
|
2843
|
-
fontSize: "0.82rem",
|
|
2844
|
-
cursor: "pointer",
|
|
2845
|
-
fontFamily: "inherit",
|
|
2846
|
-
padding: 0
|
|
2847
|
-
});
|
|
2848
|
-
var dropdownStyle = (tokens) => ({
|
|
2849
|
-
position: "absolute",
|
|
2850
|
-
top: "100%",
|
|
2851
|
-
left: 0,
|
|
2852
|
-
right: 0,
|
|
2853
|
-
marginTop: 4,
|
|
2854
|
-
background: tokens.bgCard,
|
|
2855
|
-
border: `1px solid ${tokens.border}`,
|
|
2856
|
-
borderRadius: tokens.radiusLg,
|
|
2857
|
-
boxShadow: tokens.shadowLg,
|
|
2858
|
-
zIndex: 50,
|
|
2859
|
-
overflow: "hidden"
|
|
2860
|
-
});
|
|
2861
|
-
var dropdownRowStyle = (tokens, active, isSelected) => ({
|
|
2862
|
-
display: "flex",
|
|
2863
|
-
alignItems: "center",
|
|
2864
|
-
justifyContent: "space-between",
|
|
2865
|
-
width: "100%",
|
|
2866
|
-
padding: "10px 14px",
|
|
2867
|
-
background: isSelected ? tokens.accent + "12" : "transparent",
|
|
2868
|
-
border: "none",
|
|
2869
|
-
borderBottom: `1px solid ${tokens.border}`,
|
|
2870
|
-
cursor: "pointer",
|
|
2871
|
-
fontFamily: "inherit",
|
|
2872
|
-
fontSize: "0.85rem",
|
|
2873
|
-
textAlign: "left",
|
|
2874
|
-
outline: "none",
|
|
2875
|
-
opacity: active ? 1 : 0.55,
|
|
2876
|
-
transition: "background 0.1s ease"
|
|
2877
|
-
});
|
|
2878
|
-
var dropdownRowLeftStyle = {
|
|
2879
|
-
display: "flex",
|
|
2880
|
-
alignItems: "center",
|
|
2881
|
-
gap: 10,
|
|
2882
|
-
minWidth: 0,
|
|
2883
|
-
flex: 1
|
|
2884
|
-
};
|
|
2885
|
-
var dropdownRowRightStyle = {
|
|
2886
|
-
display: "flex",
|
|
2887
|
-
alignItems: "center",
|
|
2888
|
-
gap: 8,
|
|
2889
|
-
flexShrink: 0
|
|
2890
|
-
};
|
|
2891
|
-
var dropdownLogoStyle = {
|
|
2892
|
-
width: 20,
|
|
2893
|
-
height: 20,
|
|
2894
|
-
borderRadius: "50%",
|
|
2895
|
-
objectFit: "contain",
|
|
2896
|
-
flexShrink: 0
|
|
2897
|
-
};
|
|
2898
|
-
var dropdownFallbackIconStyle = (color) => ({
|
|
2899
|
-
width: 20,
|
|
2900
|
-
height: 20,
|
|
2901
|
-
borderRadius: "50%",
|
|
2902
|
-
display: "flex",
|
|
2903
|
-
alignItems: "center",
|
|
2904
|
-
justifyContent: "center",
|
|
2905
|
-
fontSize: "0.72rem",
|
|
2906
|
-
fontWeight: 700,
|
|
2907
|
-
color,
|
|
2908
|
-
flexShrink: 0
|
|
2909
|
-
});
|
|
2910
|
-
var dropdownNameColumnStyle = {
|
|
2911
|
-
display: "flex",
|
|
2912
|
-
flexDirection: "column",
|
|
2913
|
-
gap: 2,
|
|
2914
|
-
minWidth: 0
|
|
2915
|
-
};
|
|
2916
|
-
var dropdownNameStyle = (color) => ({
|
|
2917
|
-
fontWeight: 500,
|
|
2918
|
-
color,
|
|
2919
|
-
whiteSpace: "nowrap",
|
|
2920
|
-
overflow: "hidden",
|
|
2921
|
-
textOverflow: "ellipsis"
|
|
2922
|
-
});
|
|
2923
|
-
var dropdownAddressStyle = (color) => ({
|
|
2924
|
-
fontSize: "0.72rem",
|
|
2925
|
-
color,
|
|
2926
|
-
fontFamily: '"SF Mono", "Fira Code", monospace',
|
|
2927
|
-
whiteSpace: "nowrap",
|
|
2928
|
-
overflow: "hidden",
|
|
2929
|
-
textOverflow: "ellipsis"
|
|
2930
|
-
});
|
|
2931
|
-
var activeBadgeStyle = (tokens) => ({
|
|
2932
|
-
fontSize: "0.6rem",
|
|
2933
|
-
fontWeight: 600,
|
|
2934
|
-
color: tokens.success,
|
|
2935
|
-
background: tokens.successBg,
|
|
2936
|
-
padding: "2px 7px",
|
|
2937
|
-
borderRadius: 999,
|
|
2938
|
-
textTransform: "uppercase",
|
|
2939
|
-
letterSpacing: "0.03em",
|
|
2940
|
-
whiteSpace: "nowrap"
|
|
2941
|
-
});
|
|
2942
|
-
var inactiveBadgeStyle = (tokens) => ({
|
|
2943
|
-
fontSize: "0.6rem",
|
|
2944
|
-
fontWeight: 600,
|
|
2945
|
-
color: tokens.warning,
|
|
2946
|
-
background: tokens.warningBg ?? `${tokens.warning}1a`,
|
|
2947
|
-
padding: "2px 7px",
|
|
2948
|
-
borderRadius: 999,
|
|
2949
|
-
textTransform: "uppercase",
|
|
2950
|
-
letterSpacing: "0.03em",
|
|
2951
|
-
whiteSpace: "nowrap"
|
|
2952
|
-
});
|
|
2953
|
-
var dropdownDividerStyle = (borderColor) => ({
|
|
2954
|
-
height: 0,
|
|
2955
|
-
borderTop: `1px solid ${borderColor}`
|
|
2956
|
-
});
|
|
2957
|
-
var remainingAllowanceStyle = (color) => ({
|
|
2958
|
-
fontSize: "0.68rem",
|
|
2959
|
-
color,
|
|
2960
|
-
fontWeight: 500,
|
|
2961
|
-
whiteSpace: "nowrap",
|
|
2962
|
-
overflow: "hidden",
|
|
2963
|
-
textOverflow: "ellipsis"
|
|
2964
|
-
});
|
|
2965
|
-
var exceedsLimitBadgeStyle = (tokens) => ({
|
|
2966
|
-
fontSize: "0.6rem",
|
|
2967
|
-
fontWeight: 600,
|
|
2968
|
-
color: tokens.warning,
|
|
2969
|
-
background: tokens.warningBg ?? `${tokens.warning}1a`,
|
|
2970
|
-
padding: "2px 7px",
|
|
2971
|
-
borderRadius: 999,
|
|
2972
|
-
textTransform: "uppercase",
|
|
2973
|
-
letterSpacing: "0.03em",
|
|
2974
|
-
whiteSpace: "nowrap"
|
|
2975
|
-
});
|
|
2976
|
-
var addProviderStyle = (tokens) => ({
|
|
2977
|
-
display: "flex",
|
|
2978
|
-
alignItems: "center",
|
|
2979
|
-
gap: 8,
|
|
2980
|
-
width: "100%",
|
|
2981
|
-
padding: "10px 14px",
|
|
2982
|
-
background: "transparent",
|
|
2983
|
-
border: "none",
|
|
2984
|
-
color: tokens.accent,
|
|
2714
|
+
color: tokens.text,
|
|
2715
|
+
fontSize: "1.25rem",
|
|
2985
2716
|
fontWeight: 600,
|
|
2986
|
-
fontSize: "0.85rem",
|
|
2987
|
-
cursor: "pointer",
|
|
2988
2717
|
fontFamily: "inherit",
|
|
2989
|
-
textAlign: "
|
|
2990
|
-
outline: "none"
|
|
2718
|
+
textAlign: "center",
|
|
2719
|
+
outline: "none",
|
|
2720
|
+
caretColor: tokens.borderFocus,
|
|
2721
|
+
transition: "border-color 0.15s ease"
|
|
2991
2722
|
});
|
|
2992
2723
|
function StepList({ steps }) {
|
|
2993
2724
|
const { tokens } = useSwypeConfig();
|
|
@@ -2998,11 +2729,11 @@ function StepList({ steps }) {
|
|
|
2998
2729
|
/* @__PURE__ */ jsx(
|
|
2999
2730
|
"div",
|
|
3000
2731
|
{
|
|
3001
|
-
style:
|
|
3002
|
-
isComplete ? tokens.accent : tokens.border,
|
|
2732
|
+
style: badgeStyle2(
|
|
2733
|
+
isComplete || isActive ? tokens.accent : tokens.border,
|
|
3003
2734
|
isComplete
|
|
3004
2735
|
),
|
|
3005
|
-
children: isComplete ? /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: "#fff" }) }) :
|
|
2736
|
+
children: isComplete ? /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: "#fff" }) }) : /* @__PURE__ */ jsx("span", { style: isActive ? activeBadgeNumberStyle(tokens.accent) : badgeNumberStyle, children: i + 1 })
|
|
3006
2737
|
}
|
|
3007
2738
|
),
|
|
3008
2739
|
/* @__PURE__ */ jsxs("div", { style: labelContainerStyle, children: [
|
|
@@ -3033,26 +2764,16 @@ var badgeStyle2 = (color, filled) => ({
|
|
|
3033
2764
|
justifyContent: "center",
|
|
3034
2765
|
flexShrink: 0
|
|
3035
2766
|
});
|
|
3036
|
-
var activeBadgeContainerStyle = {
|
|
3037
|
-
width: 28,
|
|
3038
|
-
height: 28,
|
|
3039
|
-
display: "flex",
|
|
3040
|
-
alignItems: "center",
|
|
3041
|
-
justifyContent: "center",
|
|
3042
|
-
flexShrink: 0
|
|
3043
|
-
};
|
|
3044
|
-
var activeDotStyle = (color) => ({
|
|
3045
|
-
width: 8,
|
|
3046
|
-
height: 8,
|
|
3047
|
-
borderRadius: "50%",
|
|
3048
|
-
backgroundColor: color,
|
|
3049
|
-
display: "block"
|
|
3050
|
-
});
|
|
3051
2767
|
var badgeNumberStyle = {
|
|
3052
2768
|
fontSize: "0.75rem",
|
|
3053
2769
|
fontWeight: 600,
|
|
3054
2770
|
color: "inherit"
|
|
3055
2771
|
};
|
|
2772
|
+
var activeBadgeNumberStyle = (color) => ({
|
|
2773
|
+
fontSize: "0.75rem",
|
|
2774
|
+
fontWeight: 600,
|
|
2775
|
+
color
|
|
2776
|
+
});
|
|
3056
2777
|
var labelContainerStyle = {
|
|
3057
2778
|
display: "flex",
|
|
3058
2779
|
flexDirection: "column"
|
|
@@ -3066,87 +2787,6 @@ var detailStyle = (color) => ({
|
|
|
3066
2787
|
fontSize: "0.75rem",
|
|
3067
2788
|
color
|
|
3068
2789
|
});
|
|
3069
|
-
function SettingsMenu({ onLogout }) {
|
|
3070
|
-
const { tokens } = useSwypeConfig();
|
|
3071
|
-
const [open, setOpen] = useState(false);
|
|
3072
|
-
const menuRef = useRef(null);
|
|
3073
|
-
const toggle = useCallback(() => setOpen((prev) => !prev), []);
|
|
3074
|
-
useEffect(() => {
|
|
3075
|
-
if (!open) return;
|
|
3076
|
-
const handleClickOutside = (e) => {
|
|
3077
|
-
if (menuRef.current && !menuRef.current.contains(e.target)) {
|
|
3078
|
-
setOpen(false);
|
|
3079
|
-
}
|
|
3080
|
-
};
|
|
3081
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
3082
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3083
|
-
}, [open]);
|
|
3084
|
-
return /* @__PURE__ */ jsxs("div", { ref: menuRef, style: containerStyle8, children: [
|
|
3085
|
-
/* @__PURE__ */ jsx("button", { type: "button", onClick: toggle, style: triggerStyle(tokens.text), "aria-label": "Settings", children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: [
|
|
3086
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "2", fill: "currentColor" }),
|
|
3087
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
|
|
3088
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "19", r: "2", fill: "currentColor" })
|
|
3089
|
-
] }) }),
|
|
3090
|
-
open && /* @__PURE__ */ jsx("div", { style: dropdownStyle2(tokens), children: /* @__PURE__ */ jsxs(
|
|
3091
|
-
"button",
|
|
3092
|
-
{
|
|
3093
|
-
type: "button",
|
|
3094
|
-
onClick: () => {
|
|
3095
|
-
setOpen(false);
|
|
3096
|
-
onLogout();
|
|
3097
|
-
},
|
|
3098
|
-
style: menuItemStyle(tokens),
|
|
3099
|
-
children: [
|
|
3100
|
-
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 8, flexShrink: 0 }, children: [
|
|
3101
|
-
/* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
3102
|
-
/* @__PURE__ */ jsx("polyline", { points: "16 17 21 12 16 7", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
3103
|
-
/* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
3104
|
-
] }),
|
|
3105
|
-
"Log out"
|
|
3106
|
-
]
|
|
3107
|
-
}
|
|
3108
|
-
) })
|
|
3109
|
-
] });
|
|
3110
|
-
}
|
|
3111
|
-
var containerStyle8 = {
|
|
3112
|
-
position: "relative"
|
|
3113
|
-
};
|
|
3114
|
-
var triggerStyle = (color) => ({
|
|
3115
|
-
background: "transparent",
|
|
3116
|
-
border: "none",
|
|
3117
|
-
cursor: "pointer",
|
|
3118
|
-
padding: 4,
|
|
3119
|
-
color,
|
|
3120
|
-
display: "flex",
|
|
3121
|
-
alignItems: "center",
|
|
3122
|
-
justifyContent: "center"
|
|
3123
|
-
});
|
|
3124
|
-
var dropdownStyle2 = (tokens) => ({
|
|
3125
|
-
position: "absolute",
|
|
3126
|
-
right: 0,
|
|
3127
|
-
top: "100%",
|
|
3128
|
-
marginTop: 4,
|
|
3129
|
-
minWidth: 140,
|
|
3130
|
-
background: tokens.bgCard,
|
|
3131
|
-
border: `1px solid ${tokens.border}`,
|
|
3132
|
-
borderRadius: 12,
|
|
3133
|
-
boxShadow: tokens.shadow,
|
|
3134
|
-
zIndex: 100,
|
|
3135
|
-
overflow: "hidden"
|
|
3136
|
-
});
|
|
3137
|
-
var menuItemStyle = (tokens) => ({
|
|
3138
|
-
width: "100%",
|
|
3139
|
-
display: "flex",
|
|
3140
|
-
alignItems: "center",
|
|
3141
|
-
padding: "12px 16px",
|
|
3142
|
-
background: "transparent",
|
|
3143
|
-
border: "none",
|
|
3144
|
-
cursor: "pointer",
|
|
3145
|
-
fontFamily: "inherit",
|
|
3146
|
-
fontSize: "0.85rem",
|
|
3147
|
-
fontWeight: 500,
|
|
3148
|
-
color: tokens.error
|
|
3149
|
-
});
|
|
3150
2790
|
function LoginScreen({
|
|
3151
2791
|
authInput,
|
|
3152
2792
|
onAuthInputChange,
|
|
@@ -3438,6 +3078,7 @@ var resendStyle = (color, disabled) => ({
|
|
|
3438
3078
|
function PasskeyScreen({
|
|
3439
3079
|
onCreatePasskey,
|
|
3440
3080
|
onBack,
|
|
3081
|
+
onLogout,
|
|
3441
3082
|
creating,
|
|
3442
3083
|
error,
|
|
3443
3084
|
popupFallback = false,
|
|
@@ -3454,7 +3095,7 @@ function PasskeyScreen({
|
|
|
3454
3095
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3455
3096
|
] }),
|
|
3456
3097
|
children: [
|
|
3457
|
-
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3098
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
3458
3099
|
/* @__PURE__ */ jsxs("div", { style: contentStyle4, children: [
|
|
3459
3100
|
/* @__PURE__ */ jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
|
|
3460
3101
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle2(tokens), children: error })
|
|
@@ -3544,7 +3185,8 @@ function WalletPickerScreen({
|
|
|
3544
3185
|
onPrepareProvider,
|
|
3545
3186
|
onSelectProvider,
|
|
3546
3187
|
onContinueConnection,
|
|
3547
|
-
onBack
|
|
3188
|
+
onBack,
|
|
3189
|
+
onLogout
|
|
3548
3190
|
}) {
|
|
3549
3191
|
const { tokens } = useSwypeConfig();
|
|
3550
3192
|
const [hoveredId, setHoveredId] = useState(null);
|
|
@@ -3581,7 +3223,7 @@ function WalletPickerScreen({
|
|
|
3581
3223
|
const selectedProvider = displayProviders.find((p) => p.id === selectedProviderId);
|
|
3582
3224
|
if (loading) {
|
|
3583
3225
|
return /* @__PURE__ */ jsxs(ScreenLayout, { children: [
|
|
3584
|
-
/* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack }),
|
|
3226
|
+
/* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack, onLogout }),
|
|
3585
3227
|
/* @__PURE__ */ jsx("div", { style: { textAlign: "center", padding: "48px 0", flex: 1, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(Spinner, { label: "Connecting..." }) })
|
|
3586
3228
|
] });
|
|
3587
3229
|
}
|
|
@@ -3611,7 +3253,7 @@ function WalletPickerScreen({
|
|
|
3611
3253
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3612
3254
|
] }),
|
|
3613
3255
|
children: [
|
|
3614
|
-
/* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack }),
|
|
3256
|
+
/* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack, onLogout }),
|
|
3615
3257
|
hasPending && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3616
3258
|
/* @__PURE__ */ jsx("h2", { style: headingStyle4(tokens.text), children: "Continue where you left off" }),
|
|
3617
3259
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
|
|
@@ -3633,7 +3275,7 @@ function WalletPickerScreen({
|
|
|
3633
3275
|
{
|
|
3634
3276
|
src: KNOWN_LOGOS[acct.name.toLowerCase()],
|
|
3635
3277
|
alt: acct.name,
|
|
3636
|
-
style:
|
|
3278
|
+
style: logoImgStyle
|
|
3637
3279
|
}
|
|
3638
3280
|
) : /* @__PURE__ */ jsx("span", { style: emojiStyle, children: WALLET_EMOJIS[acct.name.toLowerCase()] ?? acct.name.charAt(0) }) }),
|
|
3639
3281
|
/* @__PURE__ */ jsxs("div", { style: pendingInfoStyle, children: [
|
|
@@ -3694,10 +3336,10 @@ function WalletPickerScreen({
|
|
|
3694
3336
|
{
|
|
3695
3337
|
src: logoSrc,
|
|
3696
3338
|
alt: p.name,
|
|
3697
|
-
style:
|
|
3339
|
+
style: logoImgStyle
|
|
3698
3340
|
}
|
|
3699
3341
|
) : /* @__PURE__ */ jsx("span", { style: emojiStyle, children: emoji }),
|
|
3700
|
-
/* @__PURE__ */ jsx("span", { style:
|
|
3342
|
+
/* @__PURE__ */ jsx("span", { style: nameStyle(tokens.text), children: p.name })
|
|
3701
3343
|
]
|
|
3702
3344
|
},
|
|
3703
3345
|
p.id
|
|
@@ -3750,13 +3392,13 @@ var emojiStyle = {
|
|
|
3750
3392
|
fontSize: "1.75rem",
|
|
3751
3393
|
lineHeight: 1
|
|
3752
3394
|
};
|
|
3753
|
-
var
|
|
3395
|
+
var logoImgStyle = {
|
|
3754
3396
|
width: 32,
|
|
3755
3397
|
height: 32,
|
|
3756
3398
|
borderRadius: 8,
|
|
3757
3399
|
objectFit: "contain"
|
|
3758
3400
|
};
|
|
3759
|
-
var
|
|
3401
|
+
var nameStyle = (color) => ({
|
|
3760
3402
|
fontSize: "0.88rem",
|
|
3761
3403
|
fontWeight: 600,
|
|
3762
3404
|
color
|
|
@@ -3879,6 +3521,7 @@ function SetupScreen({
|
|
|
3879
3521
|
availableBalance,
|
|
3880
3522
|
onSetupOneTap,
|
|
3881
3523
|
onBack,
|
|
3524
|
+
onLogout,
|
|
3882
3525
|
onAdvanced,
|
|
3883
3526
|
loading,
|
|
3884
3527
|
error
|
|
@@ -3887,12 +3530,14 @@ function SetupScreen({
|
|
|
3887
3530
|
const effectiveMax = DEFAULT_MAX;
|
|
3888
3531
|
const effectiveMin = Math.min(ABSOLUTE_MIN, effectiveMax);
|
|
3889
3532
|
const [limit, setLimit] = useState(() => Math.min(availableBalance, effectiveMax));
|
|
3533
|
+
const [activePreset, setActivePreset] = useState(null);
|
|
3890
3534
|
const [editing, setEditing] = useState(false);
|
|
3891
3535
|
const [inputValue, setInputValue] = useState("");
|
|
3892
3536
|
const inputRef = useRef(null);
|
|
3893
3537
|
const startEditing = useCallback(() => {
|
|
3894
3538
|
setInputValue(limit.toFixed(2));
|
|
3895
3539
|
setEditing(true);
|
|
3540
|
+
setActivePreset(null);
|
|
3896
3541
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
3897
3542
|
}, [limit]);
|
|
3898
3543
|
const commitEdit = useCallback(() => {
|
|
@@ -3900,16 +3545,17 @@ function SetupScreen({
|
|
|
3900
3545
|
if (!isNaN(parsed)) {
|
|
3901
3546
|
setLimit(Math.min(effectiveMax, Math.max(effectiveMin, Math.round(parsed * 100) / 100)));
|
|
3902
3547
|
}
|
|
3548
|
+
setActivePreset(null);
|
|
3903
3549
|
setEditing(false);
|
|
3904
3550
|
}, [inputValue, effectiveMax, effectiveMin]);
|
|
3905
3551
|
const selectPreset = (value) => {
|
|
3906
3552
|
setLimit(Math.min(value, effectiveMax));
|
|
3553
|
+
setActivePreset(value);
|
|
3907
3554
|
};
|
|
3908
3555
|
const selectMax = () => {
|
|
3909
3556
|
setLimit(Math.min(availableBalance, effectiveMax));
|
|
3557
|
+
setActivePreset("max");
|
|
3910
3558
|
};
|
|
3911
|
-
const isPresetActive = (value) => Math.abs(limit - value) < 5e-3;
|
|
3912
|
-
const isMaxActive = Math.abs(limit - Math.min(availableBalance, effectiveMax)) < 5e-3 && !PRESETS.some((p) => isPresetActive(p));
|
|
3913
3559
|
return /* @__PURE__ */ jsxs(
|
|
3914
3560
|
ScreenLayout,
|
|
3915
3561
|
{
|
|
@@ -3926,7 +3572,7 @@ function SetupScreen({
|
|
|
3926
3572
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3927
3573
|
] }),
|
|
3928
3574
|
children: [
|
|
3929
|
-
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3575
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
3930
3576
|
/* @__PURE__ */ jsx("h2", { style: headingStyle5(tokens.text), children: "Set Spending Limit" }),
|
|
3931
3577
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle3(tokens), children: error }),
|
|
3932
3578
|
/* @__PURE__ */ jsxs("div", { style: amountRowStyle, children: [
|
|
@@ -3987,7 +3633,7 @@ function SetupScreen({
|
|
|
3987
3633
|
{
|
|
3988
3634
|
type: "button",
|
|
3989
3635
|
onClick: () => selectPreset(value),
|
|
3990
|
-
style: presetButtonStyle(tokens,
|
|
3636
|
+
style: presetButtonStyle(tokens, activePreset === value),
|
|
3991
3637
|
children: [
|
|
3992
3638
|
"$",
|
|
3993
3639
|
value.toLocaleString()
|
|
@@ -4000,7 +3646,7 @@ function SetupScreen({
|
|
|
4000
3646
|
{
|
|
4001
3647
|
type: "button",
|
|
4002
3648
|
onClick: selectMax,
|
|
4003
|
-
style: presetButtonStyle(tokens,
|
|
3649
|
+
style: presetButtonStyle(tokens, activePreset === "max"),
|
|
4004
3650
|
children: "Max"
|
|
4005
3651
|
}
|
|
4006
3652
|
)
|
|
@@ -4125,7 +3771,7 @@ function SetupStatusScreen({
|
|
|
4125
3771
|
{ label: "Done", status: "pending" }
|
|
4126
3772
|
];
|
|
4127
3773
|
return /* @__PURE__ */ jsxs(ScreenLayout, { children: [
|
|
4128
|
-
/* @__PURE__ */ jsx(ScreenHeader, {
|
|
3774
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
4129
3775
|
/* @__PURE__ */ jsxs("div", { style: contentStyle5, children: [
|
|
4130
3776
|
/* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
4131
3777
|
/* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Setting up One-Tap..." }),
|
|
@@ -4188,9 +3834,6 @@ var waitHintStyle = (color) => ({
|
|
|
4188
3834
|
var MIN_DEPOSIT = 0.25;
|
|
4189
3835
|
function DepositScreen({
|
|
4190
3836
|
merchantName,
|
|
4191
|
-
sourceName,
|
|
4192
|
-
sourceAddress,
|
|
4193
|
-
sourceVerified,
|
|
4194
3837
|
availableBalance,
|
|
4195
3838
|
remainingLimit,
|
|
4196
3839
|
tokenCount,
|
|
@@ -4214,7 +3857,7 @@ function DepositScreen({
|
|
|
4214
3857
|
const { tokens } = useSwypeConfig();
|
|
4215
3858
|
const amount = initialAmount;
|
|
4216
3859
|
const isLowBalance = availableBalance < MIN_DEPOSIT;
|
|
4217
|
-
const exceedsLimit = amount > remainingLimit && !isLowBalance;
|
|
3860
|
+
const exceedsLimit = remainingLimit != null && amount > remainingLimit && !isLowBalance;
|
|
4218
3861
|
const canDeposit = amount >= MIN_DEPOSIT && !exceedsLimit && !isLowBalance && !processing;
|
|
4219
3862
|
const headerTitle = merchantName ? `Deposit to ${merchantName}` : "Deposit";
|
|
4220
3863
|
if (isLowBalance) {
|
|
@@ -4228,21 +3871,7 @@ function DepositScreen({
|
|
|
4228
3871
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
4229
3872
|
] }),
|
|
4230
3873
|
children: [
|
|
4231
|
-
/* @__PURE__ */ jsx(ScreenHeader, { title: headerTitle, onBack,
|
|
4232
|
-
/* @__PURE__ */ jsx(
|
|
4233
|
-
SourceCard,
|
|
4234
|
-
{
|
|
4235
|
-
name: sourceName,
|
|
4236
|
-
address: sourceAddress,
|
|
4237
|
-
verified: sourceVerified,
|
|
4238
|
-
accounts,
|
|
4239
|
-
selectedAccountId,
|
|
4240
|
-
depositAmount: amount,
|
|
4241
|
-
onSelectAccount,
|
|
4242
|
-
onAuthorizeAccount,
|
|
4243
|
-
onAddProvider
|
|
4244
|
-
}
|
|
4245
|
-
),
|
|
3874
|
+
/* @__PURE__ */ jsx(ScreenHeader, { title: headerTitle, onBack, onLogout }),
|
|
4246
3875
|
/* @__PURE__ */ jsx("div", { style: lowBalanceAmountDisplayStyle, children: /* @__PURE__ */ jsxs("span", { style: lowBalanceAmountStyle, children: [
|
|
4247
3876
|
"$",
|
|
4248
3877
|
amount.toFixed(2)
|
|
@@ -4274,7 +3903,6 @@ function DepositScreen({
|
|
|
4274
3903
|
}
|
|
4275
3904
|
);
|
|
4276
3905
|
}
|
|
4277
|
-
const providerLogo = KNOWN_LOGOS[sourceName.toLowerCase()];
|
|
4278
3906
|
return /* @__PURE__ */ jsxs(
|
|
4279
3907
|
ScreenLayout,
|
|
4280
3908
|
{
|
|
@@ -4285,7 +3913,7 @@ function DepositScreen({
|
|
|
4285
3913
|
"Your deposit of $",
|
|
4286
3914
|
amount.toFixed(2),
|
|
4287
3915
|
" exceeds your One-Tap limit of $",
|
|
4288
|
-
remainingLimit
|
|
3916
|
+
remainingLimit?.toFixed(2) ?? "0.00",
|
|
4289
3917
|
". Increase your limit to continue."
|
|
4290
3918
|
] })
|
|
4291
3919
|
] }) : /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onDeposit(amount), disabled: !canDeposit, loading: processing, children: "Confirm" }),
|
|
@@ -4293,7 +3921,6 @@ function DepositScreen({
|
|
|
4293
3921
|
] }),
|
|
4294
3922
|
children: [
|
|
4295
3923
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
4296
|
-
/* @__PURE__ */ jsx("div", { style: mascotWrapStyle, children: /* @__PURE__ */ jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotStyle3 }) }),
|
|
4297
3924
|
/* @__PURE__ */ jsxs("div", { style: depositCardStyle(tokens), children: [
|
|
4298
3925
|
/* @__PURE__ */ jsx("div", { style: depositLabelStyle(tokens.textMuted), children: "Depositing" }),
|
|
4299
3926
|
/* @__PURE__ */ jsxs("div", { style: amountRowStyle2, children: [
|
|
@@ -4322,17 +3949,69 @@ function DepositScreen({
|
|
|
4322
3949
|
]
|
|
4323
3950
|
}
|
|
4324
3951
|
)
|
|
4325
|
-
] }),
|
|
4326
|
-
/* @__PURE__ */ jsxs("div", { style: walletBalanceRowStyle, children: [
|
|
4327
|
-
providerLogo ? /* @__PURE__ */ jsx("img", { src: providerLogo, alt: sourceName, style: providerLogoStyle }) : /* @__PURE__ */ jsx("div", { style: providerFallbackStyle(tokens.textMuted), children: sourceName.charAt(0) }),
|
|
4328
|
-
/* @__PURE__ */ jsxs("span", { style: walletBalanceStyle(tokens.text), children: [
|
|
4329
|
-
"$",
|
|
4330
|
-
availableBalance.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
4331
|
-
] }),
|
|
4332
|
-
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.4 }, children: /* @__PURE__ */ jsx("path", { d: "M7 10l5-5 5 5M7 14l5 5 5-5", stroke: tokens.textMuted, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
4333
3952
|
] })
|
|
4334
3953
|
] }),
|
|
4335
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3954
|
+
accounts && accounts.length > 0 && /* @__PURE__ */ jsxs("div", { style: accountSectionStyle, children: [
|
|
3955
|
+
/* @__PURE__ */ jsx("div", { style: accountSectionLabelStyle(tokens.textMuted), children: "Choose account" }),
|
|
3956
|
+
/* @__PURE__ */ jsxs("div", { style: accountListStyle(tokens), children: [
|
|
3957
|
+
accounts.map((account) => {
|
|
3958
|
+
const preferredWallet = getPreferredDepositWallet(account, amount);
|
|
3959
|
+
const active = hasActiveDepositWallet(account);
|
|
3960
|
+
const isSelected = account.id === selectedAccountId;
|
|
3961
|
+
const walletAddress = preferredWallet ? getWalletAddress(preferredWallet) : null;
|
|
3962
|
+
const truncatedAddress = walletAddress ? `${walletAddress.slice(0, 6)}...${walletAddress.slice(-4)}` : null;
|
|
3963
|
+
const accountBalance = account.wallets.reduce(
|
|
3964
|
+
(sum, w) => sum + w.balance.available.amount,
|
|
3965
|
+
0
|
|
3966
|
+
);
|
|
3967
|
+
const providerLogo = KNOWN_LOGOS[account.name.toLowerCase()];
|
|
3968
|
+
return /* @__PURE__ */ jsxs(
|
|
3969
|
+
"button",
|
|
3970
|
+
{
|
|
3971
|
+
type: "button",
|
|
3972
|
+
onClick: () => {
|
|
3973
|
+
if (active) {
|
|
3974
|
+
onSelectAccount?.(account.id);
|
|
3975
|
+
} else {
|
|
3976
|
+
onAuthorizeAccount?.(account.id);
|
|
3977
|
+
}
|
|
3978
|
+
},
|
|
3979
|
+
style: accountRowStyle(tokens),
|
|
3980
|
+
children: [
|
|
3981
|
+
/* @__PURE__ */ jsxs("div", { style: accountRowLeftStyle, children: [
|
|
3982
|
+
providerLogo ? /* @__PURE__ */ jsx("img", { src: providerLogo, alt: account.name, style: accountLogoStyle }) : /* @__PURE__ */ jsx("div", { style: accountFallbackIconStyle(tokens.textMuted), children: account.name.charAt(0) }),
|
|
3983
|
+
/* @__PURE__ */ jsxs("div", { style: accountInfoStyle, children: [
|
|
3984
|
+
/* @__PURE__ */ jsx("span", { style: accountAddressStyle(tokens.text), children: truncatedAddress ?? account.nickname ?? account.name }),
|
|
3985
|
+
/* @__PURE__ */ jsxs("span", { style: accountBalanceTextStyle(tokens.textMuted), children: [
|
|
3986
|
+
"$",
|
|
3987
|
+
accountBalance.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3988
|
+
] })
|
|
3989
|
+
] })
|
|
3990
|
+
] }),
|
|
3991
|
+
isSelected ? /* @__PURE__ */ jsxs("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", children: [
|
|
3992
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "11", fill: tokens.success }),
|
|
3993
|
+
/* @__PURE__ */ jsx("path", { d: "M7 11l3 3 5-5", stroke: "#fff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
3994
|
+
] }) : /* @__PURE__ */ jsx("div", { style: radioEmptyStyle(tokens.border) })
|
|
3995
|
+
]
|
|
3996
|
+
},
|
|
3997
|
+
account.id
|
|
3998
|
+
);
|
|
3999
|
+
}),
|
|
4000
|
+
onAddProvider && /* @__PURE__ */ jsxs(
|
|
4001
|
+
"button",
|
|
4002
|
+
{
|
|
4003
|
+
type: "button",
|
|
4004
|
+
onClick: onAddProvider,
|
|
4005
|
+
style: addAccountBtnStyle(tokens),
|
|
4006
|
+
children: [
|
|
4007
|
+
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }) }),
|
|
4008
|
+
"Add Account"
|
|
4009
|
+
]
|
|
4010
|
+
}
|
|
4011
|
+
)
|
|
4012
|
+
] })
|
|
4013
|
+
] }),
|
|
4014
|
+
remainingLimit != null && /* @__PURE__ */ jsxs("div", { style: spendingLimitStyle(tokens.textMuted), children: [
|
|
4336
4015
|
"Spending Limit",
|
|
4337
4016
|
" ",
|
|
4338
4017
|
/* @__PURE__ */ jsxs("strong", { style: { color: tokens.text }, children: [
|
|
@@ -4345,15 +4024,6 @@ function DepositScreen({
|
|
|
4345
4024
|
}
|
|
4346
4025
|
);
|
|
4347
4026
|
}
|
|
4348
|
-
var mascotWrapStyle = {
|
|
4349
|
-
display: "flex",
|
|
4350
|
-
justifyContent: "center",
|
|
4351
|
-
marginBottom: 16
|
|
4352
|
-
};
|
|
4353
|
-
var mascotStyle3 = {
|
|
4354
|
-
width: 36,
|
|
4355
|
-
height: 36
|
|
4356
|
-
};
|
|
4357
4027
|
var depositCardStyle = (tokens) => ({
|
|
4358
4028
|
background: tokens.bgInput,
|
|
4359
4029
|
border: `1px solid ${tokens.border}`,
|
|
@@ -4399,33 +4069,102 @@ var checkBadgeStyle2 = {
|
|
|
4399
4069
|
bottom: -1,
|
|
4400
4070
|
right: -3
|
|
4401
4071
|
};
|
|
4402
|
-
var
|
|
4072
|
+
var accountSectionStyle = {
|
|
4073
|
+
marginBottom: 20
|
|
4074
|
+
};
|
|
4075
|
+
var accountSectionLabelStyle = (color) => ({
|
|
4076
|
+
fontSize: "0.78rem",
|
|
4077
|
+
fontWeight: 500,
|
|
4078
|
+
color,
|
|
4079
|
+
marginBottom: 8
|
|
4080
|
+
});
|
|
4081
|
+
var accountListStyle = (tokens) => ({
|
|
4082
|
+
background: tokens.bgInput,
|
|
4083
|
+
border: `1px solid ${tokens.border}`,
|
|
4084
|
+
borderRadius: tokens.radiusLg,
|
|
4085
|
+
overflow: "hidden"
|
|
4086
|
+
});
|
|
4087
|
+
var accountRowStyle = (tokens, isSelected) => ({
|
|
4403
4088
|
display: "flex",
|
|
4404
4089
|
alignItems: "center",
|
|
4405
|
-
|
|
4090
|
+
justifyContent: "space-between",
|
|
4091
|
+
width: "100%",
|
|
4092
|
+
padding: "14px 16px",
|
|
4093
|
+
background: "transparent",
|
|
4094
|
+
border: "none",
|
|
4095
|
+
borderBottom: `1px solid ${tokens.border}`,
|
|
4096
|
+
cursor: "pointer",
|
|
4097
|
+
fontFamily: "inherit",
|
|
4098
|
+
textAlign: "left",
|
|
4099
|
+
outline: "none"
|
|
4100
|
+
});
|
|
4101
|
+
var accountRowLeftStyle = {
|
|
4102
|
+
display: "flex",
|
|
4103
|
+
alignItems: "center",
|
|
4104
|
+
gap: 12,
|
|
4105
|
+
minWidth: 0,
|
|
4106
|
+
flex: 1
|
|
4406
4107
|
};
|
|
4407
|
-
var
|
|
4408
|
-
width:
|
|
4409
|
-
height:
|
|
4108
|
+
var accountLogoStyle = {
|
|
4109
|
+
width: 28,
|
|
4110
|
+
height: 28,
|
|
4410
4111
|
borderRadius: "50%",
|
|
4411
|
-
objectFit: "contain"
|
|
4112
|
+
objectFit: "contain",
|
|
4113
|
+
flexShrink: 0
|
|
4412
4114
|
};
|
|
4413
|
-
var
|
|
4414
|
-
width:
|
|
4415
|
-
height:
|
|
4115
|
+
var accountFallbackIconStyle = (color) => ({
|
|
4116
|
+
width: 28,
|
|
4117
|
+
height: 28,
|
|
4416
4118
|
borderRadius: "50%",
|
|
4417
4119
|
display: "flex",
|
|
4418
4120
|
alignItems: "center",
|
|
4419
4121
|
justifyContent: "center",
|
|
4420
|
-
fontSize: "0.
|
|
4122
|
+
fontSize: "0.75rem",
|
|
4421
4123
|
fontWeight: 700,
|
|
4422
4124
|
color,
|
|
4423
4125
|
flexShrink: 0
|
|
4424
4126
|
});
|
|
4425
|
-
var
|
|
4426
|
-
|
|
4127
|
+
var accountInfoStyle = {
|
|
4128
|
+
display: "flex",
|
|
4129
|
+
flexDirection: "column",
|
|
4130
|
+
gap: 2,
|
|
4131
|
+
minWidth: 0
|
|
4132
|
+
};
|
|
4133
|
+
var accountAddressStyle = (color) => ({
|
|
4427
4134
|
fontWeight: 600,
|
|
4428
|
-
|
|
4135
|
+
fontSize: "0.88rem",
|
|
4136
|
+
color,
|
|
4137
|
+
whiteSpace: "nowrap",
|
|
4138
|
+
overflow: "hidden",
|
|
4139
|
+
textOverflow: "ellipsis"
|
|
4140
|
+
});
|
|
4141
|
+
var accountBalanceTextStyle = (color) => ({
|
|
4142
|
+
fontSize: "0.76rem",
|
|
4143
|
+
color,
|
|
4144
|
+
fontWeight: 500
|
|
4145
|
+
});
|
|
4146
|
+
var radioEmptyStyle = (borderColor) => ({
|
|
4147
|
+
width: 22,
|
|
4148
|
+
height: 22,
|
|
4149
|
+
borderRadius: "50%",
|
|
4150
|
+
border: `2px solid ${borderColor}`,
|
|
4151
|
+
flexShrink: 0
|
|
4152
|
+
});
|
|
4153
|
+
var addAccountBtnStyle = (tokens) => ({
|
|
4154
|
+
display: "flex",
|
|
4155
|
+
alignItems: "center",
|
|
4156
|
+
gap: 8,
|
|
4157
|
+
width: "100%",
|
|
4158
|
+
padding: "12px 16px",
|
|
4159
|
+
background: "transparent",
|
|
4160
|
+
border: "none",
|
|
4161
|
+
color: tokens.accent,
|
|
4162
|
+
fontWeight: 600,
|
|
4163
|
+
fontSize: "0.85rem",
|
|
4164
|
+
cursor: "pointer",
|
|
4165
|
+
fontFamily: "inherit",
|
|
4166
|
+
textAlign: "left",
|
|
4167
|
+
outline: "none"
|
|
4429
4168
|
});
|
|
4430
4169
|
var spendingLimitStyle = (color) => ({
|
|
4431
4170
|
textAlign: "center",
|
|
@@ -4545,12 +4284,7 @@ function SuccessScreen({
|
|
|
4545
4284
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
4546
4285
|
] }),
|
|
4547
4286
|
children: [
|
|
4548
|
-
/* @__PURE__ */ jsx(
|
|
4549
|
-
ScreenHeader,
|
|
4550
|
-
{
|
|
4551
|
-
right: /* @__PURE__ */ jsx(SettingsMenu, { onLogout })
|
|
4552
|
-
}
|
|
4553
|
-
),
|
|
4287
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
4554
4288
|
/* @__PURE__ */ jsxs("div", { style: contentStyle6, children: [
|
|
4555
4289
|
succeeded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4556
4290
|
/* @__PURE__ */ jsx(IconCircle, { variant: "success", size: 64, children: /* @__PURE__ */ jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: tokens.success }) }) }),
|
|
@@ -4717,7 +4451,7 @@ function SelectSourceScreen({
|
|
|
4717
4451
|
{
|
|
4718
4452
|
title: "Select Source",
|
|
4719
4453
|
onBack,
|
|
4720
|
-
|
|
4454
|
+
onLogout
|
|
4721
4455
|
}
|
|
4722
4456
|
),
|
|
4723
4457
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle5(tokens.textMuted), children: "Choose which chain and token to pay from." }),
|
|
@@ -5084,12 +4818,13 @@ function buildSteps(phase) {
|
|
|
5084
4818
|
}
|
|
5085
4819
|
function TransferStatusScreen({
|
|
5086
4820
|
phase,
|
|
5087
|
-
error
|
|
4821
|
+
error,
|
|
4822
|
+
onLogout
|
|
5088
4823
|
}) {
|
|
5089
4824
|
const { tokens } = useSwypeConfig();
|
|
5090
4825
|
const steps = buildSteps(phase);
|
|
5091
4826
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
5092
|
-
/* @__PURE__ */ jsx(ScreenHeader, {}),
|
|
4827
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
5093
4828
|
/* @__PURE__ */ jsxs("div", { style: contentStyle7, children: [
|
|
5094
4829
|
/* @__PURE__ */ jsx(Spinner, { size: 64 }),
|
|
5095
4830
|
/* @__PURE__ */ jsx("h2", { style: headingStyle9(tokens.text), children: "Depositing your money..." }),
|
|
@@ -5158,6 +4893,7 @@ function OpenWalletScreen({
|
|
|
5158
4893
|
walletName,
|
|
5159
4894
|
deeplinkUri,
|
|
5160
4895
|
loading,
|
|
4896
|
+
useDeeplink = true,
|
|
5161
4897
|
error,
|
|
5162
4898
|
onRetryStatus,
|
|
5163
4899
|
onBack,
|
|
@@ -5168,16 +4904,44 @@ function OpenWalletScreen({
|
|
|
5168
4904
|
const logoSrc = walletName ? KNOWN_LOGOS[walletName.toLowerCase()] : void 0;
|
|
5169
4905
|
const autoOpenedRef = useRef(null);
|
|
5170
4906
|
useEffect(() => {
|
|
5171
|
-
if (loading || !deeplinkUri || autoOpenedRef.current === deeplinkUri) return;
|
|
4907
|
+
if (!useDeeplink || loading || !deeplinkUri || autoOpenedRef.current === deeplinkUri) return;
|
|
5172
4908
|
autoOpenedRef.current = deeplinkUri;
|
|
5173
4909
|
triggerDeeplink(deeplinkUri);
|
|
5174
|
-
}, [loading, deeplinkUri]);
|
|
4910
|
+
}, [useDeeplink, loading, deeplinkUri]);
|
|
5175
4911
|
const handleOpen = useCallback(() => {
|
|
5176
4912
|
const opened = window.open(deeplinkUri, "_blank");
|
|
5177
4913
|
if (!opened && window === window.parent) {
|
|
5178
4914
|
window.location.href = deeplinkUri;
|
|
5179
4915
|
}
|
|
5180
4916
|
}, [deeplinkUri]);
|
|
4917
|
+
if (!useDeeplink) {
|
|
4918
|
+
return /* @__PURE__ */ jsxs(
|
|
4919
|
+
ScreenLayout,
|
|
4920
|
+
{
|
|
4921
|
+
footer: /* @__PURE__ */ jsxs("div", { style: footerContentStyle, children: [
|
|
4922
|
+
error && /* @__PURE__ */ jsx(InfoBanner, { children: error }),
|
|
4923
|
+
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
4924
|
+
] }),
|
|
4925
|
+
children: [
|
|
4926
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
4927
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
|
|
4928
|
+
/* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
|
|
4929
|
+
/* @__PURE__ */ jsxs("h2", { style: headingStyle10(tokens.text), children: [
|
|
4930
|
+
"Setting up ",
|
|
4931
|
+
displayName,
|
|
4932
|
+
"..."
|
|
4933
|
+
] }),
|
|
4934
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Approve the connection in your wallet extension." }),
|
|
4935
|
+
/* @__PURE__ */ jsxs("div", { style: waitingBadgeStyle(tokens), children: [
|
|
4936
|
+
/* @__PURE__ */ jsx(Spinner, { size: 14 }),
|
|
4937
|
+
/* @__PURE__ */ jsx("span", { children: "Waiting for authorization..." })
|
|
4938
|
+
] }),
|
|
4939
|
+
/* @__PURE__ */ jsx("p", { style: waitHintStyle2(tokens.textMuted), children: "Usually takes a few seconds" })
|
|
4940
|
+
] })
|
|
4941
|
+
]
|
|
4942
|
+
}
|
|
4943
|
+
);
|
|
4944
|
+
}
|
|
5181
4945
|
return /* @__PURE__ */ jsxs(
|
|
5182
4946
|
ScreenLayout,
|
|
5183
4947
|
{
|
|
@@ -5192,7 +4956,7 @@ function OpenWalletScreen({
|
|
|
5192
4956
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
5193
4957
|
] }),
|
|
5194
4958
|
children: [
|
|
5195
|
-
/* @__PURE__ */ jsx(ScreenHeader, { onBack,
|
|
4959
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
5196
4960
|
/* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
|
|
5197
4961
|
/* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
|
|
5198
4962
|
/* @__PURE__ */ jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
|
|
@@ -5267,6 +5031,11 @@ var hintStyle = (color) => ({
|
|
|
5267
5031
|
color,
|
|
5268
5032
|
margin: "8px 0 0"
|
|
5269
5033
|
});
|
|
5034
|
+
var waitHintStyle2 = (color) => ({
|
|
5035
|
+
fontSize: "0.82rem",
|
|
5036
|
+
color,
|
|
5037
|
+
margin: "16px 0 0"
|
|
5038
|
+
});
|
|
5270
5039
|
function ConfirmSignScreen({
|
|
5271
5040
|
walletName,
|
|
5272
5041
|
signing,
|
|
@@ -5286,7 +5055,7 @@ function ConfirmSignScreen({
|
|
|
5286
5055
|
!error && /* @__PURE__ */ jsx("p", { style: hintStyle2(tokens.textMuted), children: "You may be prompted for biometric verification" })
|
|
5287
5056
|
] }),
|
|
5288
5057
|
children: [
|
|
5289
|
-
/* @__PURE__ */ jsx(ScreenHeader, {
|
|
5058
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
5290
5059
|
/* @__PURE__ */ jsxs("div", { style: contentStyle9, children: [
|
|
5291
5060
|
logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
5292
5061
|
/* @__PURE__ */ jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
|
|
@@ -5365,6 +5134,7 @@ function TokenPickerScreen({
|
|
|
5365
5134
|
onSelectAuthorized,
|
|
5366
5135
|
onAuthorizeToken,
|
|
5367
5136
|
onBack,
|
|
5137
|
+
onLogout,
|
|
5368
5138
|
depositAmount
|
|
5369
5139
|
}) {
|
|
5370
5140
|
const { tokens: t } = useSwypeConfig();
|
|
@@ -5393,8 +5163,8 @@ function TokenPickerScreen({
|
|
|
5393
5163
|
}
|
|
5394
5164
|
};
|
|
5395
5165
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
5396
|
-
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
5397
|
-
/* @__PURE__ */ jsx("div", { style:
|
|
5166
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
5167
|
+
/* @__PURE__ */ jsx("div", { style: mascotWrapStyle, children: /* @__PURE__ */ jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotImgStyle }) }),
|
|
5398
5168
|
depositAmount != null && /* @__PURE__ */ jsxs("div", { style: depositCardStyle2(t), children: [
|
|
5399
5169
|
/* @__PURE__ */ jsx("div", { style: depositLabelStyle2(t.textMuted), children: "Depositing" }),
|
|
5400
5170
|
/* @__PURE__ */ jsxs("div", { style: depositAmountRowStyle, children: [
|
|
@@ -5447,7 +5217,7 @@ function TokenPickerScreen({
|
|
|
5447
5217
|
}) })
|
|
5448
5218
|
] });
|
|
5449
5219
|
}
|
|
5450
|
-
var
|
|
5220
|
+
var mascotWrapStyle = {
|
|
5451
5221
|
display: "flex",
|
|
5452
5222
|
justifyContent: "center",
|
|
5453
5223
|
marginBottom: 16
|
|
@@ -5631,8 +5401,6 @@ function StepRendererContent({
|
|
|
5631
5401
|
pendingConnections,
|
|
5632
5402
|
depositEligibleAccounts,
|
|
5633
5403
|
sourceName,
|
|
5634
|
-
sourceAddress,
|
|
5635
|
-
sourceVerified,
|
|
5636
5404
|
maxSourceBalance,
|
|
5637
5405
|
tokenCount,
|
|
5638
5406
|
selectedAccount,
|
|
@@ -5698,6 +5466,7 @@ function StepRendererContent({
|
|
|
5698
5466
|
{
|
|
5699
5467
|
onCreatePasskey: handlers.onRegisterPasskey,
|
|
5700
5468
|
onBack: handlers.onLogout,
|
|
5469
|
+
onLogout: handlers.onLogout,
|
|
5701
5470
|
creating: state.registeringPasskey,
|
|
5702
5471
|
error: state.error,
|
|
5703
5472
|
popupFallback: state.passkeyPopupNeeded,
|
|
@@ -5711,6 +5480,7 @@ function StepRendererContent({
|
|
|
5711
5480
|
{
|
|
5712
5481
|
onCreatePasskey: handlers.onRegisterPasskey,
|
|
5713
5482
|
onBack: handlers.onLogout,
|
|
5483
|
+
onLogout: handlers.onLogout,
|
|
5714
5484
|
creating: state.verifyingPasskeyPopup,
|
|
5715
5485
|
error: state.error,
|
|
5716
5486
|
popupFallback: true,
|
|
@@ -5731,21 +5501,26 @@ function StepRendererContent({
|
|
|
5731
5501
|
onPrepareProvider: handlers.onPrepareProvider,
|
|
5732
5502
|
onSelectProvider: handlers.onSelectProvider,
|
|
5733
5503
|
onContinueConnection: handlers.onContinueConnection,
|
|
5734
|
-
onBack: () => handlers.onNavigate(state.activeCredentialId ? "deposit" : "create-passkey")
|
|
5504
|
+
onBack: () => handlers.onNavigate(state.activeCredentialId ? "deposit" : "create-passkey"),
|
|
5505
|
+
onLogout: handlers.onLogout
|
|
5735
5506
|
}
|
|
5736
5507
|
);
|
|
5737
5508
|
}
|
|
5738
5509
|
if (step === "open-wallet") {
|
|
5739
5510
|
const providerName = state.providers.find((p) => p.id === state.selectedProviderId)?.name ?? null;
|
|
5511
|
+
const useDeeplink = !shouldUseWalletConnector({
|
|
5512
|
+
userAgent: typeof navigator === "undefined" ? void 0 : navigator.userAgent
|
|
5513
|
+
});
|
|
5740
5514
|
return /* @__PURE__ */ jsx(
|
|
5741
5515
|
OpenWalletScreen,
|
|
5742
5516
|
{
|
|
5743
5517
|
walletName: providerName,
|
|
5744
5518
|
deeplinkUri: state.deeplinkUri ?? "",
|
|
5745
|
-
loading: state.creatingTransfer || !state.deeplinkUri,
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5519
|
+
loading: useDeeplink ? state.creatingTransfer || !state.deeplinkUri : state.creatingTransfer,
|
|
5520
|
+
useDeeplink,
|
|
5521
|
+
error: state.error || (useDeeplink ? pollingError : authExecutorError),
|
|
5522
|
+
onRetryStatus: useDeeplink ? handlers.onRetryMobileStatus : void 0,
|
|
5523
|
+
onBack: useDeeplink ? () => handlers.onNavigate("wallet-picker") : void 0,
|
|
5749
5524
|
onLogout: handlers.onLogout
|
|
5750
5525
|
}
|
|
5751
5526
|
);
|
|
@@ -5809,11 +5584,8 @@ function StepRendererContent({
|
|
|
5809
5584
|
DepositScreen,
|
|
5810
5585
|
{
|
|
5811
5586
|
merchantName,
|
|
5812
|
-
sourceName,
|
|
5813
|
-
sourceAddress,
|
|
5814
|
-
sourceVerified,
|
|
5815
5587
|
availableBalance: selectedSource ? selectedSource.balance.available.amount : selectedAccount ? selectedAccount.wallets.reduce((sum, w) => sum + w.balance.available.amount, 0) : maxSourceBalance,
|
|
5816
|
-
remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ??
|
|
5588
|
+
remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? null,
|
|
5817
5589
|
tokenCount,
|
|
5818
5590
|
initialAmount: parsedAmt,
|
|
5819
5591
|
processing: state.creatingTransfer,
|
|
@@ -5846,6 +5618,7 @@ function StepRendererContent({
|
|
|
5846
5618
|
onSelectAuthorized: handlers.onSelectAuthorizedToken,
|
|
5847
5619
|
onAuthorizeToken: handlers.onAuthorizeToken,
|
|
5848
5620
|
onBack: () => handlers.onNavigate(state.previousStep === "setup" ? "setup" : "deposit"),
|
|
5621
|
+
onLogout: handlers.onLogout,
|
|
5849
5622
|
depositAmount: depositAmount ?? void 0
|
|
5850
5623
|
}
|
|
5851
5624
|
);
|
|
@@ -5893,7 +5666,8 @@ function StepRendererContent({
|
|
|
5893
5666
|
merchantName,
|
|
5894
5667
|
sourceName,
|
|
5895
5668
|
remainingLimit: succeeded ? (() => {
|
|
5896
|
-
const limit = selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ??
|
|
5669
|
+
const limit = selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? null;
|
|
5670
|
+
if (limit == null) return null;
|
|
5897
5671
|
return limit > displayAmount ? limit - displayAmount : 0;
|
|
5898
5672
|
})() : void 0,
|
|
5899
5673
|
onDone: onDismiss ?? handlers.onNewPayment,
|
|
@@ -5907,11 +5681,8 @@ function StepRendererContent({
|
|
|
5907
5681
|
DepositScreen,
|
|
5908
5682
|
{
|
|
5909
5683
|
merchantName,
|
|
5910
|
-
sourceName,
|
|
5911
|
-
sourceAddress,
|
|
5912
|
-
sourceVerified,
|
|
5913
5684
|
availableBalance: 0,
|
|
5914
|
-
remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ??
|
|
5685
|
+
remainingLimit: selectedSource?.remainingAllowance ?? selectedAccount?.remainingAllowance ?? null,
|
|
5915
5686
|
tokenCount,
|
|
5916
5687
|
initialAmount: depositAmount ?? 5,
|
|
5917
5688
|
processing: false,
|
|
@@ -5967,7 +5738,7 @@ var PaymentErrorBoundary = class extends Component {
|
|
|
5967
5738
|
return this.props.children;
|
|
5968
5739
|
}
|
|
5969
5740
|
return /* @__PURE__ */ jsxs("div", { style: containerStyle9, children: [
|
|
5970
|
-
/* @__PURE__ */ jsx("div", { style:
|
|
5741
|
+
/* @__PURE__ */ jsx("div", { style: iconStyle3, children: /* @__PURE__ */ jsxs("svg", { width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", children: [
|
|
5971
5742
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "#ef4444", strokeWidth: "1.5" }),
|
|
5972
5743
|
/* @__PURE__ */ jsx("path", { d: "M12 8v5", stroke: "#ef4444", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
5973
5744
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "16", r: "0.75", fill: "#ef4444" })
|
|
@@ -5989,7 +5760,7 @@ var containerStyle9 = {
|
|
|
5989
5760
|
maxWidth: 420,
|
|
5990
5761
|
margin: "0 auto"
|
|
5991
5762
|
};
|
|
5992
|
-
var
|
|
5763
|
+
var iconStyle3 = {
|
|
5993
5764
|
marginBottom: 20
|
|
5994
5765
|
};
|
|
5995
5766
|
var headingStyle12 = {
|
|
@@ -6031,8 +5802,6 @@ function useDerivedState(state) {
|
|
|
6031
5802
|
return selectedWallet.sources.find((s) => s.token.status === "AUTHORIZED") ?? selectedWallet.sources[0] ?? null;
|
|
6032
5803
|
}, [selectedWallet, state.selectedTokenSymbol]);
|
|
6033
5804
|
const sourceName = selectedAccount?.name ?? selectedWallet?.chain.name ?? "Wallet";
|
|
6034
|
-
const sourceAddress = selectedWallet ? `${selectedWallet.name.slice(0, 6)}...${selectedWallet.name.slice(-4)}` : void 0;
|
|
6035
|
-
const sourceVerified = selectedWallet?.status === "ACTIVE";
|
|
6036
5805
|
const pendingConnections = useMemo(
|
|
6037
5806
|
() => state.accounts.filter(
|
|
6038
5807
|
(a) => a.wallets.length > 0 && !a.wallets.some((w) => w.status === "ACTIVE")
|
|
@@ -6074,8 +5843,6 @@ function useDerivedState(state) {
|
|
|
6074
5843
|
selectedWallet,
|
|
6075
5844
|
selectedSource,
|
|
6076
5845
|
sourceName,
|
|
6077
|
-
sourceAddress,
|
|
6078
|
-
sourceVerified,
|
|
6079
5846
|
pendingConnections,
|
|
6080
5847
|
depositEligibleAccounts,
|
|
6081
5848
|
maxSourceBalance,
|
|
@@ -6702,7 +6469,7 @@ function useProviderHandlers(deps) {
|
|
|
6702
6469
|
});
|
|
6703
6470
|
if (!isMobile) {
|
|
6704
6471
|
dispatch({ type: "PAY_STARTED", isSetupRedirect: false });
|
|
6705
|
-
dispatch({ type: "NAVIGATE", step: "
|
|
6472
|
+
dispatch({ type: "NAVIGATE", step: "open-wallet" });
|
|
6706
6473
|
}
|
|
6707
6474
|
try {
|
|
6708
6475
|
let accountId;
|
|
@@ -6857,7 +6624,7 @@ function useProviderHandlers(deps) {
|
|
|
6857
6624
|
dispatch({ type: "MOBILE_DEEPLINK_READY", deeplinkUri: session.uri });
|
|
6858
6625
|
triggerDeeplink(session.uri);
|
|
6859
6626
|
} else {
|
|
6860
|
-
dispatch({ type: "NAVIGATE", step: "
|
|
6627
|
+
dispatch({ type: "NAVIGATE", step: "open-wallet" });
|
|
6861
6628
|
await authExecutor.executeSessionById(session.id);
|
|
6862
6629
|
await reloadAccounts();
|
|
6863
6630
|
dispatch({ type: "NAVIGATE", step: "deposit" });
|
|
@@ -6950,7 +6717,7 @@ function useProviderHandlers(deps) {
|
|
|
6950
6717
|
dispatch({ type: "MOBILE_DEEPLINK_READY", deeplinkUri: session.uri });
|
|
6951
6718
|
triggerDeeplink(session.uri);
|
|
6952
6719
|
} else {
|
|
6953
|
-
dispatch({ type: "NAVIGATE", step: "
|
|
6720
|
+
dispatch({ type: "NAVIGATE", step: "open-wallet" });
|
|
6954
6721
|
await authExecutor.executeSessionById(session.id);
|
|
6955
6722
|
await reloadAccounts();
|
|
6956
6723
|
dispatch({ type: "SELECT_TOKEN", walletId: _walletId, tokenSymbol });
|
|
@@ -7025,7 +6792,7 @@ function useOneTapSetupHandlers(deps) {
|
|
|
7025
6792
|
}
|
|
7026
6793
|
oneTapLimitSavedDuringSetupRef.current = true;
|
|
7027
6794
|
authExecutor.resolveSelectSource({ chainName, tokenSymbol });
|
|
7028
|
-
dispatch({ type: "NAVIGATE", step: "
|
|
6795
|
+
dispatch({ type: "NAVIGATE", step: "open-wallet" });
|
|
7029
6796
|
} else if (authExecutor.pendingOneTapSetup) {
|
|
7030
6797
|
authExecutor.resolveOneTapSetup();
|
|
7031
6798
|
} else {
|
|
@@ -7663,7 +7430,7 @@ function usePaymentEffects(deps) {
|
|
|
7663
7430
|
useWalletConnector: useWalletConnectorProp,
|
|
7664
7431
|
userAgent: typeof navigator === "undefined" ? void 0 : navigator.userAgent
|
|
7665
7432
|
});
|
|
7666
|
-
if (isDesktop && state.step === "setup-status") {
|
|
7433
|
+
if (isDesktop && (state.step === "setup-status" || state.step === "open-wallet")) {
|
|
7667
7434
|
preSelectSourceStepRef.current = state.step;
|
|
7668
7435
|
dispatch({ type: "NAVIGATE", step: "setup" });
|
|
7669
7436
|
return;
|
|
@@ -7678,7 +7445,7 @@ function usePaymentEffects(deps) {
|
|
|
7678
7445
|
const pendingOneTapSetupAction = authExecutor.pendingOneTapSetup;
|
|
7679
7446
|
const preOneTapSetupStepRef = useRef(null);
|
|
7680
7447
|
useEffect(() => {
|
|
7681
|
-
if (pendingOneTapSetupAction && state.step === "setup-status") {
|
|
7448
|
+
if (pendingOneTapSetupAction && (state.step === "setup-status" || state.step === "open-wallet")) {
|
|
7682
7449
|
if (oneTapLimitSavedDuringSetupRef.current) {
|
|
7683
7450
|
oneTapLimitSavedDuringSetupRef.current = false;
|
|
7684
7451
|
authExecutor.resolveOneTapSetup();
|
|
@@ -7931,8 +7698,6 @@ function SwypePaymentInner({
|
|
|
7931
7698
|
pendingConnections: derived.pendingConnections,
|
|
7932
7699
|
depositEligibleAccounts: derived.depositEligibleAccounts,
|
|
7933
7700
|
sourceName: derived.sourceName,
|
|
7934
|
-
sourceAddress: derived.sourceAddress,
|
|
7935
|
-
sourceVerified: derived.sourceVerified,
|
|
7936
7701
|
maxSourceBalance: derived.maxSourceBalance,
|
|
7937
7702
|
tokenCount: derived.tokenCount,
|
|
7938
7703
|
selectedAccount: derived.selectedAccount,
|