@agg-build/ui 1.0.0 → 1.0.1

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.
Files changed (56) hide show
  1. package/dist/{chunk-2QJXRRYP.mjs → chunk-43K4PFBC.mjs} +3 -2
  2. package/dist/{chunk-I2WBGEWK.mjs → chunk-5ES2VJHO.mjs} +159 -93
  3. package/dist/{chunk-DMKKNK76.mjs → chunk-BYMLPLEZ.mjs} +791 -583
  4. package/dist/{chunk-C7T56TJR.mjs → chunk-HD6HBTK2.mjs} +1 -1
  5. package/dist/{chunk-CGNDMLQL.mjs → chunk-LPNZOX3E.mjs} +123 -52
  6. package/dist/{chunk-75IGOQ4N.mjs → chunk-WLXYCBZV.mjs} +62 -32
  7. package/dist/{chunk-6NS7D73S.mjs → chunk-YZNO6IUD.mjs} +740 -521
  8. package/dist/events.js +196 -93
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +3396 -2806
  11. package/dist/index.mjs +13 -7
  12. package/dist/modals.js +798 -535
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +378 -176
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +713 -531
  17. package/dist/primitives.mjs +7 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +242 -54
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/deposit/steps/card-payment-pending.d.mts +3 -1
  23. package/dist/types/deposit/steps/card-payment-pending.d.ts +3 -1
  24. package/dist/types/deposit/steps/crypto-transfer.d.mts +1 -1
  25. package/dist/types/deposit/steps/crypto-transfer.d.ts +1 -1
  26. package/dist/types/events/item/event-list-item.utils.d.mts +57 -0
  27. package/dist/types/events/item/event-list-item.utils.d.ts +57 -0
  28. package/dist/types/events/item-details/event-list-item-details.types.d.mts +16 -1
  29. package/dist/types/events/item-details/event-list-item-details.types.d.ts +16 -1
  30. package/dist/types/events/market-details/market-details.types.d.mts +8 -0
  31. package/dist/types/events/market-details/market-details.types.d.ts +8 -0
  32. package/dist/types/primitives/copy-button/index.d.mts +25 -0
  33. package/dist/types/primitives/copy-button/index.d.ts +25 -0
  34. package/dist/types/primitives/index.d.mts +2 -0
  35. package/dist/types/primitives/index.d.ts +2 -0
  36. package/dist/types/primitives/toast/index.d.mts +4 -0
  37. package/dist/types/primitives/toast/index.d.ts +4 -0
  38. package/dist/types/primitives/toast/toast.types.d.mts +31 -0
  39. package/dist/types/primitives/toast/toast.types.d.ts +31 -0
  40. package/dist/types/trading/place-order/index.place-order.constants.d.mts +8 -0
  41. package/dist/types/trading/place-order/index.place-order.constants.d.ts +8 -0
  42. package/dist/types/trading/place-order/index.place-order.types.d.mts +6 -0
  43. package/dist/types/trading/place-order/index.place-order.types.d.ts +6 -0
  44. package/dist/types/trading/place-order/index.place-order.utils.d.mts +4 -7
  45. package/dist/types/trading/place-order/index.place-order.utils.d.ts +4 -7
  46. package/dist/types/withdraw/index.d.mts +2 -2
  47. package/dist/types/withdraw/index.d.ts +2 -2
  48. package/dist/types/withdraw/steps/withdraw-amount.d.mts +6 -3
  49. package/dist/types/withdraw/steps/withdraw-amount.d.ts +6 -3
  50. package/dist/types/withdraw/steps/withdraw-success.d.mts +8 -1
  51. package/dist/types/withdraw/steps/withdraw-success.d.ts +8 -1
  52. package/dist/types/withdraw/steps/withdraw-success.utils.d.mts +36 -0
  53. package/dist/types/withdraw/steps/withdraw-success.utils.d.ts +36 -0
  54. package/dist/types/withdraw/withdraw-modal.types.d.mts +25 -15
  55. package/dist/types/withdraw/withdraw-modal.types.d.ts +25 -15
  56. package/package.json +6 -5
package/dist/modals.js CHANGED
@@ -108,6 +108,7 @@ var Dialog = __toESM(require("@radix-ui/react-dialog"));
108
108
 
109
109
  // src/constants.ts
110
110
  var AGG_ROOT_CLASS_NAME = "agg-root";
111
+ var AGG_TERMS_OF_SERVICE_URL = "https://build.agg.market/terms-and-conditions";
111
112
 
112
113
  // src/shared/utils.ts
113
114
  var cn = (...values) => values.filter(Boolean).join(" ");
@@ -4357,26 +4358,80 @@ var CardDepositStep = ({
4357
4358
  };
4358
4359
 
4359
4360
  // src/deposit/steps/crypto-transfer.tsx
4360
- var import_react6 = require("react");
4361
4361
  var import_hooks17 = require("@agg-build/hooks");
4362
4362
 
4363
+ // src/primitives/copy-button/index.tsx
4364
+ var import_react6 = require("react");
4365
+ var import_jsx_runtime90 = require("react/jsx-runtime");
4366
+ var CopyButton = ({
4367
+ value,
4368
+ label,
4369
+ copiedLabel,
4370
+ "aria-label": ariaLabel,
4371
+ disabled,
4372
+ className,
4373
+ iconClassName = "h-4 w-4",
4374
+ onCopy,
4375
+ resetMs = 2e3
4376
+ }) => {
4377
+ const [isCopied, setIsCopied] = (0, import_react6.useState)(false);
4378
+ const timeoutRef = (0, import_react6.useRef)(null);
4379
+ (0, import_react6.useEffect)(
4380
+ () => () => {
4381
+ if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
4382
+ },
4383
+ []
4384
+ );
4385
+ const handleClick = (0, import_react6.useCallback)(() => {
4386
+ var _a;
4387
+ if (!value) return;
4388
+ (_a = navigator.clipboard) == null ? void 0 : _a.writeText(value).catch(() => {
4389
+ });
4390
+ setIsCopied(true);
4391
+ onCopy == null ? void 0 : onCopy();
4392
+ if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
4393
+ timeoutRef.current = setTimeout(() => setIsCopied(false), resetMs);
4394
+ }, [onCopy, resetMs, value]);
4395
+ const showLabel = label !== void 0 || copiedLabel !== void 0;
4396
+ const visibleLabel = isCopied ? copiedLabel != null ? copiedLabel : label : label;
4397
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
4398
+ "button",
4399
+ {
4400
+ type: "button",
4401
+ onClick: handleClick,
4402
+ disabled,
4403
+ "aria-label": showLabel ? void 0 : ariaLabel,
4404
+ className: cn(
4405
+ "shrink-0 inline-flex items-center gap-1 transition-colors cursor-pointer",
4406
+ "disabled:opacity-40 disabled:cursor-not-allowed",
4407
+ className
4408
+ ),
4409
+ children: [
4410
+ isCopied ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(CheckCircleIcon, { className: iconClassName }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(CopyIcon, { className: iconClassName }),
4411
+ showLabel ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "agg-type-label-strong", children: visibleLabel }) : null
4412
+ ]
4413
+ }
4414
+ );
4415
+ };
4416
+ CopyButton.displayName = "CopyButton";
4417
+
4363
4418
  // src/deposit/components/DepositQRCode.tsx
4364
4419
  var import_qrcode = require("qrcode.react");
4365
- var import_jsx_runtime90 = require("react/jsx-runtime");
4420
+ var import_jsx_runtime91 = require("react/jsx-runtime");
4366
4421
  function DepositQRCode({
4367
4422
  depositAddress,
4368
4423
  networkLogoUrl,
4369
4424
  networkLogo,
4370
4425
  size = 160
4371
4426
  }) {
4372
- const logoOverlay = networkLogo ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4427
+ const logoOverlay = networkLogo ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4373
4428
  "div",
4374
4429
  {
4375
4430
  className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-sm",
4376
4431
  style: { width: 32, height: 32, backgroundColor: "#FFFFFF", padding: 2 },
4377
4432
  children: networkLogo
4378
4433
  }
4379
- ) : networkLogoUrl ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4434
+ ) : networkLogoUrl ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4380
4435
  "img",
4381
4436
  {
4382
4437
  src: networkLogoUrl,
@@ -4387,7 +4442,7 @@ function DepositQRCode({
4387
4442
  style: { backgroundColor: "#FFFFFF", padding: 2 }
4388
4443
  }
4389
4444
  ) : null;
4390
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4445
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4391
4446
  "div",
4392
4447
  {
4393
4448
  className: "inline-flex items-center justify-center rounded-xl border",
@@ -4396,8 +4451,8 @@ function DepositQRCode({
4396
4451
  borderColor: "#E5E7EB",
4397
4452
  backgroundColor: "#FFFFFF"
4398
4453
  },
4399
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "relative", style: { width: size, height: size }, children: [
4400
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_qrcode.QRCodeSVG, { value: depositAddress, size, level: "H" }),
4454
+ children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "relative", style: { width: size, height: size }, children: [
4455
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_qrcode.QRCodeSVG, { value: depositAddress, size, level: "H" }),
4401
4456
  logoOverlay
4402
4457
  ] })
4403
4458
  }
@@ -4406,27 +4461,27 @@ function DepositQRCode({
4406
4461
  DepositQRCode.displayName = "DepositQRCode";
4407
4462
 
4408
4463
  // src/deposit/steps/crypto-transfer.tsx
4409
- var import_jsx_runtime91 = require("react/jsx-runtime");
4464
+ var import_jsx_runtime92 = require("react/jsx-runtime");
4410
4465
  var CryptoAddressLoadingState = () => {
4411
4466
  const labels = (0, import_hooks17.useLabels)();
4412
4467
  const sendCryptoLabels = labels.deposit.sendCrypto;
4413
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
4468
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
4414
4469
  "div",
4415
4470
  {
4416
4471
  className: "flex w-full flex-col items-center justify-center gap-6 py-10 text-center text-agg-foreground",
4417
4472
  role: "status",
4418
4473
  "aria-live": "polite",
4419
4474
  children: [
4420
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4475
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4421
4476
  "span",
4422
4477
  {
4423
4478
  className: "h-9 w-9 animate-spin rounded-full border-2 border-agg-primary/25 border-t-agg-primary",
4424
4479
  "aria-hidden": "true"
4425
4480
  }
4426
4481
  ),
4427
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex w-full flex-col items-center gap-2", children: [
4428
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6", children: sendCryptoLabels.addressLoadingTitle }),
4429
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "max-w-[300px] text-agg-sm leading-agg-5", children: sendCryptoLabels.addressLoadingDescription })
4482
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex w-full flex-col items-center gap-2", children: [
4483
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6", children: sendCryptoLabels.addressLoadingTitle }),
4484
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "max-w-[300px] text-agg-sm leading-agg-5", children: sendCryptoLabels.addressLoadingDescription })
4430
4485
  ] })
4431
4486
  ]
4432
4487
  }
@@ -4451,38 +4506,32 @@ var CryptoTransferStep = ({
4451
4506
  }) => {
4452
4507
  var _a;
4453
4508
  const labels = (0, import_hooks17.useLabels)();
4454
- const [isCopied, setIsCopied] = (0, import_react6.useState)(false);
4455
- const handleCopy = (0, import_react6.useCallback)(() => {
4456
- onCopyAddress();
4457
- setIsCopied(true);
4458
- window.setTimeout(() => setIsCopied(false), 2e3);
4459
- }, [onCopyAddress]);
4460
4509
  const selectedNetworkOption = networkOptions.find((n) => n.value === selectedNetwork);
4461
4510
  const networkLogoUrl = (_a = selectedNetworkOption == null ? void 0 : selectedNetworkOption.iconUrl) != null ? _a : "";
4462
4511
  const networkLogo = selectedNetworkOption == null ? void 0 : selectedNetworkOption.icon;
4463
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
4464
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4512
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
4513
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4465
4514
  Modal.Header,
4466
4515
  {
4467
4516
  title: labels.deposit.sendCrypto.title,
4468
4517
  hideBorder: true,
4469
- leftElement: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4518
+ leftElement: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4470
4519
  "button",
4471
4520
  {
4472
4521
  type: "button",
4473
4522
  className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
4474
4523
  onClick: onBack,
4475
4524
  "aria-label": "Go back",
4476
- children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
4525
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
4477
4526
  }
4478
4527
  )
4479
4528
  }
4480
4529
  ),
4481
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col gap-7", children: [
4482
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-col gap-5", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex gap-5", children: [
4483
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4484
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.sendCrypto.tokenLabel }),
4485
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4530
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-col gap-7", children: [
4531
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "flex flex-col gap-5", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex gap-5", children: [
4532
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4533
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.sendCrypto.tokenLabel }),
4534
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4486
4535
  Select,
4487
4536
  {
4488
4537
  items: tokenOptions,
@@ -4492,9 +4541,9 @@ var CryptoTransferStep = ({
4492
4541
  }
4493
4542
  )
4494
4543
  ] }),
4495
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4496
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.sendCrypto.networkLabel }),
4497
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4544
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4545
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.sendCrypto.networkLabel }),
4546
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4498
4547
  Select,
4499
4548
  {
4500
4549
  items: networkOptions,
@@ -4505,7 +4554,7 @@ var CryptoTransferStep = ({
4505
4554
  )
4506
4555
  ] })
4507
4556
  ] }) }),
4508
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "mx-auto", children: isLoadingAddress ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CryptoAddressLoadingState, {}) : addressError ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex h-[192px] w-[192px] items-center justify-center rounded-xl border border-agg-separator bg-agg-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "agg-type-label text-center text-agg-error px-3", children: addressError }) }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4557
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "mx-auto", children: isLoadingAddress ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CryptoAddressLoadingState, {}) : addressError ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "flex h-[192px] w-[192px] items-center justify-center rounded-xl border border-agg-separator bg-agg-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label text-center text-agg-error px-3", children: addressError }) }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4509
4558
  DepositQRCode,
4510
4559
  {
4511
4560
  depositAddress,
@@ -4513,31 +4562,29 @@ var CryptoTransferStep = ({
4513
4562
  networkLogo
4514
4563
  }
4515
4564
  ) }),
4516
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col gap-3", children: [
4517
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.sendCrypto.depositAddressLabel }),
4518
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-2 rounded border border-agg-separator bg-agg-secondary h-10 px-3", children: [
4519
- isLoadingAddress ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "h-4 flex-1 animate-pulse rounded bg-agg-muted-foreground/20" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "agg-type-body flex-1 min-w-0 truncate text-agg-foreground", children: depositAddress }),
4520
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
4521
- "button",
4565
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-col gap-3", children: [
4566
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.sendCrypto.depositAddressLabel }),
4567
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center gap-2 rounded border border-agg-separator bg-agg-secondary h-10 px-3", children: [
4568
+ isLoadingAddress ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "h-4 flex-1 animate-pulse rounded bg-agg-muted-foreground/20" }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-body flex-1 min-w-0 truncate text-agg-foreground", children: depositAddress }),
4569
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4570
+ CopyButton,
4522
4571
  {
4523
- type: "button",
4572
+ value: depositAddress,
4573
+ label: labels.deposit.sendCrypto.copy,
4574
+ copiedLabel: labels.deposit.sendCrypto.copied,
4524
4575
  disabled: isLoadingAddress || !!addressError || !depositAddress,
4525
- className: "shrink-0 inline-flex items-center gap-1 text-agg-primary hover:text-agg-primary/80 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
4526
- onClick: handleCopy,
4527
- children: [
4528
- isCopied ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckCircleIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CopyIcon, { className: "h-4 w-4" }),
4529
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "agg-type-label-strong", children: isCopied ? labels.deposit.sendCrypto.copied : labels.deposit.sendCrypto.copy })
4530
- ]
4576
+ onCopy: onCopyAddress,
4577
+ className: "text-agg-primary hover:text-agg-primary/80"
4531
4578
  }
4532
4579
  )
4533
4580
  ] }),
4534
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "agg-type-label text-agg-foreground", children: `${labels.deposit.sendCrypto.minDepositPrefix} ${minDeposit} \xB7 ${labels.deposit.walletFlow.feePrefix} ${feeEstimate} \xB7 ${eta}` })
4581
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label text-agg-foreground", children: `${labels.deposit.sendCrypto.minDepositPrefix} ${minDeposit} \xB7 ${labels.deposit.walletFlow.feePrefix} ${feeEstimate} \xB7 ${eta}` })
4535
4582
  ] }),
4536
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-start gap-3 rounded-lg bg-agg-secondary-hover p-3", children: [
4537
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(WarningIcon, { className: "h-4 w-4 text-agg-muted-foreground mt-0.5" }),
4538
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-agg-xs leading-agg-4 text-agg-foreground", children: labels.deposit.sendCrypto.warning })
4583
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-start gap-3 rounded-lg bg-agg-secondary-hover p-3", children: [
4584
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(WarningIcon, { className: "h-4 w-4 text-agg-muted-foreground mt-0.5" }),
4585
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-agg-xs leading-agg-4 text-agg-foreground", children: labels.deposit.sendCrypto.warning })
4539
4586
  ] }),
4540
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4587
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4541
4588
  Button,
4542
4589
  {
4543
4590
  variant: "secondary",
@@ -4553,7 +4600,7 @@ var CryptoTransferStep = ({
4553
4600
 
4554
4601
  // src/deposit/steps/wallet-form.tsx
4555
4602
  var import_hooks18 = require("@agg-build/hooks");
4556
- var import_jsx_runtime92 = require("react/jsx-runtime");
4603
+ var import_jsx_runtime93 = require("react/jsx-runtime");
4557
4604
  var WalletFormStep = ({
4558
4605
  walletLabel,
4559
4606
  walletBalance,
@@ -4578,38 +4625,38 @@ var WalletFormStep = ({
4578
4625
  }) => {
4579
4626
  const labels = (0, import_hooks18.useLabels)();
4580
4627
  const isConfirmEnabled = !isSubmitting && !isBalanceLoading && Number(amount) > 0 && Number(amount) <= walletBalance;
4581
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
4582
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4628
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
4629
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4583
4630
  Modal.Header,
4584
4631
  {
4585
4632
  title: labels.deposit.walletFlow.title,
4586
4633
  hideBorder: true,
4587
- leftElement: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4634
+ leftElement: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4588
4635
  "button",
4589
4636
  {
4590
4637
  type: "button",
4591
4638
  className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
4592
4639
  onClick: onBack,
4593
4640
  "aria-label": "Go back",
4594
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
4641
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
4595
4642
  }
4596
4643
  )
4597
4644
  }
4598
4645
  ),
4599
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-col gap-7", children: [
4600
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center justify-between", children: [
4601
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label text-agg-foreground", children: walletLabel }),
4602
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
4646
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-col gap-7", children: [
4647
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center justify-between", children: [
4648
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-label text-agg-foreground", children: walletLabel }),
4649
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
4603
4650
  labels.deposit.balanceLabel,
4604
4651
  " ",
4605
- isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LoadingIcon, { size: "small" }) : formatCompactUsd(walletBalance)
4652
+ isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(LoadingIcon, { size: "small" }) : formatCompactUsd(walletBalance)
4606
4653
  ] })
4607
4654
  ] }),
4608
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-col gap-5", children: [
4609
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex gap-5", children: [
4610
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4611
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.walletFlow.tokenLabel }),
4612
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4655
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-col gap-5", children: [
4656
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex gap-5", children: [
4657
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4658
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.walletFlow.tokenLabel }),
4659
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4613
4660
  Select,
4614
4661
  {
4615
4662
  items: tokenOptions,
@@ -4619,9 +4666,9 @@ var WalletFormStep = ({
4619
4666
  }
4620
4667
  )
4621
4668
  ] }),
4622
- networkOptions.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4623
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.walletFlow.networkLabel }),
4624
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4669
+ networkOptions.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
4670
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.walletFlow.networkLabel }),
4671
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4625
4672
  Select,
4626
4673
  {
4627
4674
  items: networkOptions,
@@ -4632,9 +4679,9 @@ var WalletFormStep = ({
4632
4679
  )
4633
4680
  ] }) : null
4634
4681
  ] }),
4635
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-col gap-2", children: [
4636
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.walletFlow.amountLabel }),
4637
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
4682
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-col gap-2", children: [
4683
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.walletFlow.amountLabel }),
4684
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
4638
4685
  "div",
4639
4686
  {
4640
4687
  className: cn(
@@ -4643,7 +4690,7 @@ var WalletFormStep = ({
4643
4690
  "h-10 px-3"
4644
4691
  ),
4645
4692
  children: [
4646
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4693
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4647
4694
  "input",
4648
4695
  {
4649
4696
  type: "text",
@@ -4655,7 +4702,7 @@ var WalletFormStep = ({
4655
4702
  onChange: (event) => onAmountChange(event.target.value)
4656
4703
  }
4657
4704
  ),
4658
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4705
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4659
4706
  "button",
4660
4707
  {
4661
4708
  type: "button",
@@ -4669,8 +4716,8 @@ var WalletFormStep = ({
4669
4716
  }
4670
4717
  )
4671
4718
  ] }),
4672
- estimatedReceive && feeEstimate && eta ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label text-agg-foreground", children: `\u2248 ${estimatedReceive} \xB7 ${labels.deposit.walletFlow.feePrefix} ${feeEstimate} \xB7 ${eta}` }) : null,
4673
- formErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
4719
+ estimatedReceive && feeEstimate && eta ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-label text-agg-foreground", children: `\u2248 ${estimatedReceive} \xB7 ${labels.deposit.walletFlow.feePrefix} ${feeEstimate} \xB7 ${eta}` }) : null,
4720
+ formErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
4674
4721
  "div",
4675
4722
  {
4676
4723
  className: cn(
@@ -4678,13 +4725,13 @@ var WalletFormStep = ({
4678
4725
  formErrorTone === "warning" ? "text-agg-warning" : "text-agg-error"
4679
4726
  ),
4680
4727
  children: [
4681
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(WarningIcon, { className: "mt-0.5 h-4 w-4 shrink-0" }),
4682
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "agg-type-label", children: formErrorMessage })
4728
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(WarningIcon, { className: "mt-0.5 h-4 w-4 shrink-0" }),
4729
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-label", children: formErrorMessage })
4683
4730
  ]
4684
4731
  }
4685
4732
  ) : null
4686
4733
  ] }),
4687
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4734
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4688
4735
  Button,
4689
4736
  {
4690
4737
  variant: isConfirmEnabled ? "primary" : "secondary",
@@ -4703,20 +4750,20 @@ var WalletFormStep = ({
4703
4750
 
4704
4751
  // src/deposit/steps/card-provider.tsx
4705
4752
  var import_hooks19 = require("@agg-build/hooks");
4706
- var import_jsx_runtime93 = require("react/jsx-runtime");
4753
+ var import_jsx_runtime94 = require("react/jsx-runtime");
4707
4754
  var CardProviderItem = ({ provider, onSelect }) => {
4708
4755
  const labels = (0, import_hooks19.useLabels)();
4709
4756
  const badgeText = provider.badge === "best" ? labels.deposit.cardFlow.providerBadges.best : provider.badge === "low-kyc" ? labels.deposit.cardFlow.providerBadges.lowKyc : void 0;
4710
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4757
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4711
4758
  "button",
4712
4759
  {
4713
4760
  type: "button",
4714
4761
  className: "w-full rounded-xl border border-agg-separator px-4 py-3 text-left bg-agg-secondary hover:bg-agg-secondary-hover transition-colors cursor-pointer",
4715
4762
  onClick: () => onSelect(provider.id),
4716
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
4717
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-2", children: [
4718
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: provider.name }),
4719
- badgeText ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4763
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
4764
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-2", children: [
4765
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: provider.name }),
4766
+ badgeText ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4720
4767
  "span",
4721
4768
  {
4722
4769
  className: `rounded border px-2 py-[2px] text-[10px] leading-[14px] font-agg-bold uppercase ${provider.badge === "best" ? "border-agg-primary/50 text-agg-primary bg-agg-secondary" : "border-agg-separator text-agg-foreground bg-agg-secondary"}`,
@@ -4724,16 +4771,16 @@ var CardProviderItem = ({ provider, onSelect }) => {
4724
4771
  }
4725
4772
  ) : null
4726
4773
  ] }),
4727
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-4", children: [
4728
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "text-right", children: [
4729
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-body text-agg-foreground", children: provider.quote }),
4730
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
4774
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-4", children: [
4775
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "text-right", children: [
4776
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "agg-type-body text-agg-foreground", children: provider.quote }),
4777
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
4731
4778
  labels.deposit.cardFlow.feeLabel,
4732
4779
  " ",
4733
4780
  provider.fee
4734
4781
  ] })
4735
4782
  ] }),
4736
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ChevronRightIcon, { className: "h-5 w-5 text-agg-muted-foreground" })
4783
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ChevronRightIcon, { className: "h-5 w-5 text-agg-muted-foreground" })
4737
4784
  ] })
4738
4785
  ] })
4739
4786
  }
@@ -4752,40 +4799,40 @@ var CardProviderStep = ({
4752
4799
  onRetry
4753
4800
  }) => {
4754
4801
  const labels = (0, import_hooks19.useLabels)();
4755
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
4756
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4802
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
4803
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4757
4804
  Modal.Header,
4758
4805
  {
4759
4806
  title: labels.deposit.cardFlow.selectProviderTitle,
4760
4807
  hideBorder: true,
4761
- leftElement: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4808
+ leftElement: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4762
4809
  "button",
4763
4810
  {
4764
4811
  type: "button",
4765
4812
  className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
4766
4813
  onClick: onBack,
4767
4814
  "aria-label": labels.deposit.back,
4768
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
4815
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
4769
4816
  }
4770
4817
  )
4771
4818
  }
4772
4819
  ),
4773
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-col gap-4", children: [
4774
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-1.5", children: [
4775
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(UsdcIcon, { className: "h-4 w-4 shrink-0" }),
4776
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "agg-type-body font-agg-bold text-agg-foreground", children: token }),
4777
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "agg-type-body text-agg-foreground", children: [
4820
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-4", children: [
4821
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-1.5", children: [
4822
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(UsdcIcon, { className: "h-4 w-4 shrink-0" }),
4823
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "agg-type-body font-agg-bold text-agg-foreground", children: token }),
4824
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: "agg-type-body text-agg-foreground", children: [
4778
4825
  "$",
4779
4826
  amount,
4780
4827
  " ",
4781
4828
  currency
4782
4829
  ] })
4783
4830
  ] }),
4784
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex min-h-[200px] flex-col items-center justify-center gap-3", children: [
4785
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(LoadingIcon, { variant: "prominent" }),
4786
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.cardFlow.loadingQuotes })
4787
- ] }) : error ? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex min-h-[200px] flex-col items-center justify-center gap-6 px-2 text-center", children: [
4788
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4831
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex min-h-[200px] flex-col items-center justify-center gap-3", children: [
4832
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LoadingIcon, { variant: "prominent" }),
4833
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.cardFlow.loadingQuotes })
4834
+ ] }) : error ? /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex min-h-[200px] flex-col items-center justify-center gap-6 px-2 text-center", children: [
4835
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4789
4836
  Icon,
4790
4837
  {
4791
4838
  name: "quotes-warning",
@@ -4794,13 +4841,13 @@ var CardProviderStep = ({
4794
4841
  color: "currentColor"
4795
4842
  }
4796
4843
  ),
4797
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex max-w-[320px] flex-col gap-2", children: [
4798
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: labels.deposit.cardFlow.errorLoadingQuotesTitle }),
4799
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-body text-agg-muted-foreground", children: labels.deposit.cardFlow.errorLoadingQuotesDescription })
4844
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex max-w-[320px] flex-col gap-2", children: [
4845
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: labels.deposit.cardFlow.errorLoadingQuotesTitle }),
4846
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "agg-type-body text-agg-muted-foreground", children: labels.deposit.cardFlow.errorLoadingQuotesDescription })
4800
4847
  ] }),
4801
- onRetry ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { variant: "secondary", size: "medium", onClick: onRetry, children: labels.deposit.cardFlow.retry }) : null
4802
- ] }) : providers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "flex min-h-[200px] items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-body text-agg-muted-foreground", children: labels.deposit.cardFlow.noQuotes }) }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-col gap-4", children: [
4803
- providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4848
+ onRetry ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { variant: "secondary", size: "medium", onClick: onRetry, children: labels.deposit.cardFlow.retry }) : null
4849
+ ] }) : providers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex min-h-[200px] items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "agg-type-body text-agg-muted-foreground", children: labels.deposit.cardFlow.noQuotes }) }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-4", children: [
4850
+ providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4804
4851
  CardProviderItem,
4805
4852
  {
4806
4853
  provider,
@@ -4808,7 +4855,7 @@ var CardProviderStep = ({
4808
4855
  },
4809
4856
  provider.id
4810
4857
  )),
4811
- sessionError ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "agg-type-label text-agg-error text-center", children: sessionError }) : null
4858
+ sessionError ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "agg-type-label text-agg-error text-center", children: sessionError }) : null
4812
4859
  ] })
4813
4860
  ] }) })
4814
4861
  ] });
@@ -4816,36 +4863,51 @@ var CardProviderStep = ({
4816
4863
 
4817
4864
  // src/deposit/steps/card-payment-pending.tsx
4818
4865
  var import_hooks20 = require("@agg-build/hooks");
4819
- var import_jsx_runtime94 = require("react/jsx-runtime");
4866
+ var import_jsx_runtime95 = require("react/jsx-runtime");
4820
4867
  var CardPaymentPendingStep = ({
4821
4868
  providerName,
4869
+ walletAddress,
4822
4870
  onClose,
4823
4871
  onViewActivity,
4824
4872
  onChooseAnotherProvider
4825
4873
  }) => {
4826
4874
  const labels = (0, import_hooks20.useLabels)();
4827
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
4828
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4875
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
4876
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4829
4877
  "button",
4830
4878
  {
4831
4879
  type: "button",
4832
4880
  className: "absolute right-8 top-7 flex items-center justify-center text-agg-foreground transition-colors cursor-pointer hover:text-agg-foreground/80",
4833
4881
  onClick: onClose,
4834
4882
  "aria-label": labels.common.close,
4835
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CloseIcon, { className: "h-6 w-6" })
4883
+ children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(CloseIcon, { className: "h-6 w-6" })
4836
4884
  }
4837
4885
  ),
4838
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
4839
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ExternalLinkIcon, { className: "h-[60px] w-[60px]" }) }),
4840
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4841
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.deposit.cardFlow.pendingTitle(providerName) }),
4842
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.cardFlow.pendingDescription })
4886
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
4887
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ExternalLinkIcon, { className: "h-[60px] w-[60px]" }) }),
4888
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4889
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.deposit.cardFlow.pendingTitle(providerName) }),
4890
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.cardFlow.pendingDescription })
4843
4891
  ] }),
4844
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-start justify-center gap-3", children: [
4845
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onClose, children: labels.common.close }),
4846
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { variant: "primary", size: "large", onClick: onViewActivity, children: labels.deposit.cardFlow.viewActivity })
4892
+ walletAddress ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex w-full flex-col items-center gap-3 rounded-agg-md bg-agg-secondary-hover p-5", children: [
4893
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "agg-type-label text-agg-foreground w-full", children: labels.deposit.cardFlow.pendingWalletAddressHelp }),
4894
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex w-full h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3 py-[10px]", children: [
4895
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "agg-type-body flex-1 min-w-0 truncate text-agg-foreground", children: walletAddress }),
4896
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4897
+ CopyButton,
4898
+ {
4899
+ value: walletAddress,
4900
+ "aria-label": labels.deposit.cardFlow.pendingCopyAddress,
4901
+ className: "text-agg-muted-foreground hover:text-agg-foreground"
4902
+ }
4903
+ )
4904
+ ] })
4905
+ ] }) : null,
4906
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-start justify-center gap-3", children: [
4907
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onClose, children: labels.common.close }),
4908
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { variant: "primary", size: "large", onClick: onViewActivity, children: labels.deposit.cardFlow.viewActivity })
4847
4909
  ] }),
4848
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4910
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4849
4911
  "button",
4850
4912
  {
4851
4913
  type: "button",
@@ -4860,10 +4922,10 @@ var CardPaymentPendingStep = ({
4860
4922
 
4861
4923
  // src/deposit/steps/card-purchase-success.tsx
4862
4924
  var import_hooks21 = require("@agg-build/hooks");
4863
- var import_jsx_runtime95 = require("react/jsx-runtime");
4864
- var SummaryRow = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
4865
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label }),
4866
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "agg-type-label text-agg-foreground", children: value })
4925
+ var import_jsx_runtime96 = require("react/jsx-runtime");
4926
+ var SummaryRow = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
4927
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label }),
4928
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "agg-type-label text-agg-foreground", children: value })
4867
4929
  ] });
4868
4930
  var CardPurchaseSuccessStep = ({
4869
4931
  summary,
@@ -4871,35 +4933,35 @@ var CardPurchaseSuccessStep = ({
4871
4933
  onClose
4872
4934
  }) => {
4873
4935
  const labels = (0, import_hooks21.useLabels)();
4874
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
4875
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4936
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
4937
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
4876
4938
  "button",
4877
4939
  {
4878
4940
  type: "button",
4879
4941
  className: "absolute right-8 top-7 flex items-center justify-center text-agg-foreground transition-colors hover:text-agg-foreground/80",
4880
4942
  onClick: onClose,
4881
4943
  "aria-label": labels.common.close,
4882
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(CloseIcon, { className: "h-6 w-6" })
4944
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CloseIcon, { className: "h-6 w-6" })
4883
4945
  }
4884
4946
  ),
4885
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
4886
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full bg-agg-success/15", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SuccessCheckIcon, { className: "h-6 w-6 text-agg-success" }) }),
4887
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4888
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.deposit.cardFlow.successTitle }),
4889
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.cardFlow.successDescription })
4947
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
4948
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full bg-agg-success/15", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SuccessCheckIcon, { className: "h-6 w-6 text-agg-success" }) }),
4949
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4950
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.deposit.cardFlow.successTitle }),
4951
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.cardFlow.successDescription })
4890
4952
  ] }),
4891
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
4892
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4953
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
4954
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
4893
4955
  SummaryRow,
4894
4956
  {
4895
4957
  label: labels.deposit.summary.amountReceived,
4896
4958
  value: summary.amountReceived
4897
4959
  }
4898
4960
  ),
4899
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SummaryRow, { label: labels.deposit.summary.network, value: summary.network }),
4900
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SummaryRow, { label: labels.deposit.cardFlow.summary.fees, value: summary.fees })
4961
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SummaryRow, { label: labels.deposit.summary.network, value: summary.network }),
4962
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(SummaryRow, { label: labels.deposit.cardFlow.summary.fees, value: summary.fees })
4901
4963
  ] }),
4902
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onDone, children: labels.deposit.done })
4964
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onDone, children: labels.deposit.done })
4903
4965
  ] })
4904
4966
  ] }) });
4905
4967
  };
@@ -4907,7 +4969,7 @@ var CardPurchaseSuccessStep = ({
4907
4969
  // src/deposit/steps/wallet-processing.tsx
4908
4970
  var import_hooks22 = require("@agg-build/hooks");
4909
4971
  var import_react7 = require("react");
4910
- var import_jsx_runtime96 = require("react/jsx-runtime");
4972
+ var import_jsx_runtime97 = require("react/jsx-runtime");
4911
4973
  var WalletProcessingStep = ({
4912
4974
  steps,
4913
4975
  errorMessage,
@@ -4920,14 +4982,14 @@ var WalletProcessingStep = ({
4920
4982
  onComplete();
4921
4983
  }
4922
4984
  }, [steps, onComplete]);
4923
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
4924
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Modal.Header, { title: labels.deposit.processingTitle, hideBorder: true }),
4925
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-5", children: [
4985
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
4986
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Modal.Header, { title: labels.deposit.processingTitle, hideBorder: true }),
4987
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-5", children: [
4926
4988
  steps.map((step) => {
4927
4989
  const isComplete = step.status === "complete";
4928
4990
  const isActive = step.status === "active";
4929
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center gap-3", children: [
4930
- isComplete ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CheckCircleIcon, { className: "h-4 w-4 text-agg-primary" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
4991
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-3", children: [
4992
+ isComplete ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CheckCircleIcon, { className: "h-4 w-4 text-agg-primary" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
4931
4993
  "span",
4932
4994
  {
4933
4995
  className: [
@@ -4937,7 +4999,7 @@ var WalletProcessingStep = ({
4937
4999
  ].join(" ")
4938
5000
  }
4939
5001
  ),
4940
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5002
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
4941
5003
  "p",
4942
5004
  {
4943
5005
  className: isComplete || isActive ? "agg-type-body text-agg-foreground" : "agg-type-body text-agg-muted-foreground",
@@ -4946,17 +5008,17 @@ var WalletProcessingStep = ({
4946
5008
  )
4947
5009
  ] }, step.id);
4948
5010
  }),
4949
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "agg-type-body text-agg-destructive", children: errorMessage }) : null
5011
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "agg-type-body text-agg-destructive", children: errorMessage }) : null
4950
5012
  ] }) })
4951
5013
  ] });
4952
5014
  };
4953
5015
 
4954
5016
  // src/deposit/steps/wallet-success.tsx
4955
5017
  var import_hooks23 = require("@agg-build/hooks");
4956
- var import_jsx_runtime97 = require("react/jsx-runtime");
4957
- var SummaryRow2 = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
4958
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label }),
4959
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "agg-type-label text-agg-foreground", children: value })
5018
+ var import_jsx_runtime98 = require("react/jsx-runtime");
5019
+ var SummaryRow2 = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
5020
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label }),
5021
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "agg-type-label text-agg-foreground", children: value })
4960
5022
  ] });
4961
5023
  var WalletSuccessStep = ({
4962
5024
  summary,
@@ -4964,42 +5026,42 @@ var WalletSuccessStep = ({
4964
5026
  onClose
4965
5027
  }) => {
4966
5028
  const labels = (0, import_hooks23.useLabels)();
4967
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
4968
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5029
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
5030
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
4969
5031
  "button",
4970
5032
  {
4971
5033
  type: "button",
4972
5034
  className: "absolute right-8 top-7 flex items-center justify-center text-agg-foreground transition-colors hover:text-agg-foreground/80",
4973
5035
  onClick: onClose,
4974
5036
  "aria-label": labels.common.close,
4975
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CloseIcon, { className: "h-6 w-6" })
5037
+ children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(CloseIcon, { className: "h-6 w-6" })
4976
5038
  }
4977
5039
  ),
4978
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
4979
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full bg-agg-success/15", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SuccessCheckIcon, { className: "h-6 w-6 text-agg-success" }) }),
4980
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4981
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.deposit.successTitle }),
4982
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.successDescription })
5040
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
5041
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full bg-agg-success/15", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SuccessCheckIcon, { className: "h-6 w-6 text-agg-success" }) }),
5042
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
5043
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.deposit.successTitle }),
5044
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.successDescription })
4983
5045
  ] }),
4984
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
4985
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5046
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
5047
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
4986
5048
  SummaryRow2,
4987
5049
  {
4988
5050
  label: labels.deposit.summary.amountReceived,
4989
5051
  value: summary.amountReceived
4990
5052
  }
4991
5053
  ),
4992
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SummaryRow2, { label: labels.deposit.summary.network, value: summary.network }),
4993
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SummaryRow2, { label: labels.deposit.summary.fromWallet, value: summary.fromWallet }),
4994
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SummaryRow2, { label: labels.deposit.summary.gasFee, value: summary.gasFee })
5054
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SummaryRow2, { label: labels.deposit.summary.network, value: summary.network }),
5055
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SummaryRow2, { label: labels.deposit.summary.fromWallet, value: summary.fromWallet }),
5056
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SummaryRow2, { label: labels.deposit.summary.gasFee, value: summary.gasFee })
4995
5057
  ] }),
4996
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onDone, children: labels.deposit.done })
5058
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onDone, children: labels.deposit.done })
4997
5059
  ] })
4998
5060
  ] }) });
4999
5061
  };
5000
5062
 
5001
5063
  // src/deposit/index.tsx
5002
- var import_jsx_runtime98 = require("react/jsx-runtime");
5064
+ var import_jsx_runtime99 = require("react/jsx-runtime");
5003
5065
  var PENDING_CARD_SESSION_KEY = "agg-pending-card-session";
5004
5066
  function savePendingCardSession(data) {
5005
5067
  try {
@@ -5047,7 +5109,7 @@ function isControlledDepositModalProps(props) {
5047
5109
  }
5048
5110
  function DepositModalSelfDriven({ open, onOpenChange }) {
5049
5111
  const depositProps = (0, import_deposit.useDepositFlow)({ open, onOpenChange });
5050
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DepositModalControlled, __spreadValues({}, depositProps));
5112
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(DepositModalControlled, __spreadValues({}, depositProps));
5051
5113
  }
5052
5114
  function DepositModalControlled({
5053
5115
  open,
@@ -5095,6 +5157,7 @@ function DepositModalControlled({
5095
5157
  const [quotesError, setQuotesError] = (0, import_react8.useState)(null);
5096
5158
  const [sessionError, setSessionError] = (0, import_react8.useState)(null);
5097
5159
  const [pendingProviderName, setPendingProviderName] = (0, import_react8.useState)("");
5160
+ const [pendingProviderWalletAddress, setPendingProviderWalletAddress] = (0, import_react8.useState)("");
5098
5161
  (0, import_react8.useEffect)(() => {
5099
5162
  if (pendingCardPurchaseSummary) {
5100
5163
  clearPendingCardSession();
@@ -5268,6 +5331,7 @@ function DepositModalControlled({
5268
5331
  });
5269
5332
  window.open(session.widgetUrl, "_blank", "noopener,noreferrer");
5270
5333
  setPendingProviderName((_m = selectedProvider == null ? void 0 : selectedProvider.name) != null ? _m : providerId);
5334
+ setPendingProviderWalletAddress(depositAddr);
5271
5335
  setStep("card-payment-pending");
5272
5336
  } catch (err) {
5273
5337
  setSessionError(err instanceof Error ? err.message : "Failed to create session");
@@ -5285,6 +5349,7 @@ function DepositModalControlled({
5285
5349
  setQuotesError(null);
5286
5350
  setSessionError(null);
5287
5351
  setPendingProviderName("");
5352
+ setPendingProviderWalletAddress("");
5288
5353
  setStep("card-deposit");
5289
5354
  };
5290
5355
  const handleDoneCryptoTransfer = () => {
@@ -5314,13 +5379,14 @@ function DepositModalControlled({
5314
5379
  setQuotesError(null);
5315
5380
  setSessionError(null);
5316
5381
  setPendingProviderName("");
5382
+ setPendingProviderWalletAddress("");
5317
5383
  clearPendingCardSession();
5318
5384
  }
5319
5385
  onOpenChange(isOpen);
5320
5386
  };
5321
5387
  const depositModalMaxWidth = step === "method" ? "600px" : "480px";
5322
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Modal.Container, { maxWidth: depositModalMaxWidth, "aria-label": "Deposit", children: [
5323
- step === "method" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5388
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Modal.Container, { maxWidth: depositModalMaxWidth, "aria-label": "Deposit", children: [
5389
+ step === "method" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5324
5390
  DepositMethodStep,
5325
5391
  {
5326
5392
  balance: walletFlow.balance,
@@ -5333,7 +5399,7 @@ function DepositModalControlled({
5333
5399
  onSelectMethod: handleSelectMethod
5334
5400
  }
5335
5401
  ) : null,
5336
- step === "wallet-form" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5402
+ step === "wallet-form" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5337
5403
  WalletFormStep,
5338
5404
  {
5339
5405
  walletLabel: walletFlow.walletLabel,
@@ -5397,7 +5463,7 @@ function DepositModalControlled({
5397
5463
  })
5398
5464
  }
5399
5465
  ) : null,
5400
- step === "wallet-processing" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5466
+ step === "wallet-processing" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5401
5467
  WalletProcessingStep,
5402
5468
  {
5403
5469
  steps: processingSteps,
@@ -5405,7 +5471,7 @@ function DepositModalControlled({
5405
5471
  onComplete: () => setStep("wallet-success")
5406
5472
  }
5407
5473
  ) : null,
5408
- step === "wallet-success" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5474
+ step === "wallet-success" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5409
5475
  WalletSuccessStep,
5410
5476
  {
5411
5477
  summary: resolvedSuccessSummary,
@@ -5413,7 +5479,7 @@ function DepositModalControlled({
5413
5479
  onClose: () => handleOpenChange(false)
5414
5480
  }
5415
5481
  ) : null,
5416
- step === "card-deposit" && cardFlow ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5482
+ step === "card-deposit" && cardFlow ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5417
5483
  CardDepositStep,
5418
5484
  {
5419
5485
  amount: cardFlow.amount,
@@ -5435,7 +5501,7 @@ function DepositModalControlled({
5435
5501
  onContinue: handleContinueCardDeposit
5436
5502
  }
5437
5503
  ) : null,
5438
- step === "card-provider" && cardFlow ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5504
+ step === "card-provider" && cardFlow ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5439
5505
  CardProviderStep,
5440
5506
  {
5441
5507
  amount: cardFlow.amount,
@@ -5450,16 +5516,17 @@ function DepositModalControlled({
5450
5516
  onRetry: handleRetryQuotes
5451
5517
  }
5452
5518
  ) : null,
5453
- step === "card-payment-pending" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5519
+ step === "card-payment-pending" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5454
5520
  CardPaymentPendingStep,
5455
5521
  {
5456
5522
  providerName: pendingProviderName,
5523
+ walletAddress: pendingProviderWalletAddress || void 0,
5457
5524
  onClose: () => handleOpenChange(false),
5458
5525
  onViewActivity: handleViewActivity,
5459
5526
  onChooseAnotherProvider: handleChooseAnotherProvider
5460
5527
  }
5461
5528
  ) : null,
5462
- step === "card-success" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5529
+ step === "card-success" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5463
5530
  CardPurchaseSuccessStep,
5464
5531
  {
5465
5532
  summary: (_g = pendingCardPurchaseSummary != null ? pendingCardPurchaseSummary : cardFlow == null ? void 0 : cardFlow.purchaseSummary) != null ? _g : {
@@ -5471,7 +5538,7 @@ function DepositModalControlled({
5471
5538
  onDone: handleDoneCardPurchase
5472
5539
  }
5473
5540
  ) : null,
5474
- step === "crypto-transfer" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5541
+ step === "crypto-transfer" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5475
5542
  CryptoTransferStep,
5476
5543
  {
5477
5544
  tokenOptions: sendTokenOptions,
@@ -5490,11 +5557,6 @@ function DepositModalControlled({
5490
5557
  setSendChainId(id);
5491
5558
  setSendToken("");
5492
5559
  },
5493
- onCopyAddress: () => {
5494
- var _a2;
5495
- if (depositAddress) (_a2 = navigator.clipboard) == null ? void 0 : _a2.writeText(depositAddress).catch(() => {
5496
- });
5497
- },
5498
5560
  onDone: handleDoneCryptoTransfer
5499
5561
  }
5500
5562
  ) : null
@@ -5502,69 +5564,56 @@ function DepositModalControlled({
5502
5564
  }
5503
5565
  var DepositModal = (props) => {
5504
5566
  if (!isControlledDepositModalProps(props)) {
5505
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DepositModalSelfDriven, __spreadValues({}, props));
5567
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(DepositModalSelfDriven, __spreadValues({}, props));
5506
5568
  }
5507
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DepositModalControlled, __spreadValues({}, props));
5569
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(DepositModalControlled, __spreadValues({}, props));
5508
5570
  };
5509
5571
  DepositModal.displayName = "DepositModal";
5510
5572
 
5511
5573
  // src/withdraw/index.tsx
5512
- var import_react9 = require("react");
5574
+ var import_react10 = require("react");
5575
+ var import_withdraw2 = require("@agg-build/hooks/withdraw");
5513
5576
 
5514
5577
  // src/withdraw/steps/withdraw-method.tsx
5515
5578
  var import_hooks25 = require("@agg-build/hooks");
5516
- var import_jsx_runtime99 = require("react/jsx-runtime");
5517
- var WithdrawMethodCard = ({
5518
- icon,
5519
- title,
5520
- description,
5521
- onContinue
5522
- }) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
5523
- "div",
5524
- {
5525
- className: cn(
5526
- "flex items-center gap-3 sm:gap-4 rounded-xl border border-agg-separator bg-agg-secondary p-3 sm:p-4",
5527
- "hover:bg-agg-secondary-hover transition-colors cursor-pointer"
5528
- ),
5529
- role: "button",
5530
- tabIndex: 0,
5531
- onClick: onContinue,
5532
- onKeyDown: (e) => {
5533
- if (e.key === "Enter" || e.key === " ") {
5534
- e.preventDefault();
5535
- onContinue();
5536
- }
5537
- },
5538
- children: [
5539
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-agg-secondary-hover", children: icon }),
5540
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex-1 min-w-0", children: [
5541
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: "agg-type-body-strong text-agg-foreground", children: title }),
5542
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: description })
5543
- ] }),
5544
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "shrink-0 text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ChevronRightIcon, { className: "h-5 w-5" }) })
5545
- ]
5546
- }
5547
- );
5579
+ var import_jsx_runtime100 = require("react/jsx-runtime");
5548
5580
  var WithdrawMethodStep = ({
5549
5581
  balance,
5550
5582
  onSelectMethod
5551
5583
  }) => {
5552
5584
  const labels = (0, import_hooks25.useLabels)();
5553
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
5554
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Modal.Header, { title: labels.withdraw.title, hideBorder: true }),
5555
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex flex-col gap-5", children: [
5556
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("p", { className: "agg-type-body text-agg-foreground", children: [
5585
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
5586
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Modal.Header, { title: labels.withdraw.title, hideBorder: true }),
5587
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col gap-5", children: [
5588
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("p", { className: "agg-type-body text-agg-foreground", children: [
5557
5589
  labels.withdraw.balancePrefix,
5558
5590
  " ",
5559
5591
  formatCompactUsd(balance)
5560
5592
  ] }),
5561
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5562
- WithdrawMethodCard,
5593
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
5594
+ "div",
5563
5595
  {
5564
- icon: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(CreditCardIcon, { className: "h-6 w-6 text-agg-muted-foreground" }),
5565
- title: labels.withdraw.methods.cardTitle,
5566
- description: labels.withdraw.methods.cardDescription,
5567
- onContinue: () => onSelectMethod("card")
5596
+ className: cn(
5597
+ "flex items-center gap-3 sm:gap-4 rounded-xl border border-agg-separator bg-agg-secondary p-3 sm:p-4",
5598
+ "hover:bg-agg-secondary-hover transition-colors cursor-pointer"
5599
+ ),
5600
+ role: "button",
5601
+ tabIndex: 0,
5602
+ onClick: () => onSelectMethod("wallet"),
5603
+ onKeyDown: (e) => {
5604
+ if (e.key === "Enter" || e.key === " ") {
5605
+ e.preventDefault();
5606
+ onSelectMethod("wallet");
5607
+ }
5608
+ },
5609
+ children: [
5610
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-agg-secondary-hover", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(WalletIcon, { className: "h-6 w-6 text-agg-muted-foreground" }) }),
5611
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex-1 min-w-0", children: [
5612
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "agg-type-body-strong text-agg-foreground", children: labels.withdraw.methods.walletTitle }),
5613
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: labels.withdraw.methods.walletDescription })
5614
+ ] }),
5615
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "shrink-0 text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ChevronRightIcon, { className: "h-5 w-5" }) })
5616
+ ]
5568
5617
  }
5569
5618
  )
5570
5619
  ] }) })
@@ -5573,353 +5622,567 @@ var WithdrawMethodStep = ({
5573
5622
 
5574
5623
  // src/withdraw/steps/withdraw-amount.tsx
5575
5624
  var import_hooks26 = require("@agg-build/hooks");
5576
- var import_jsx_runtime100 = require("react/jsx-runtime");
5625
+ var import_jsx_runtime101 = require("react/jsx-runtime");
5577
5626
  var WithdrawAmountStep = ({
5578
5627
  amount,
5579
- currency,
5580
5628
  destinationWallet,
5629
+ balanceDisplay,
5581
5630
  tokenOptions,
5582
5631
  networkOptions,
5583
5632
  selectedToken,
5584
5633
  selectedNetwork,
5634
+ isConfirming = false,
5635
+ error,
5585
5636
  onBack,
5586
5637
  onAmountChange,
5587
- onCurrencyChange,
5638
+ onDestinationChange,
5588
5639
  onTokenChange,
5589
5640
  onNetworkChange,
5641
+ onMaxClick,
5590
5642
  onContinue
5591
5643
  }) => {
5592
5644
  const labels = (0, import_hooks26.useLabels)();
5593
- const isValid = Number(amount) > 0;
5594
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
5595
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5645
+ const SOLANA_CHAIN_ID = "792703809";
5646
+ const isSolanaDest = selectedNetwork === SOLANA_CHAIN_ID;
5647
+ const trimmedDestination = destinationWallet.trim();
5648
+ const isValidAddress = isSolanaDest ? /^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(trimmedDestination) : /^0x[a-fA-F0-9]{40}$/.test(trimmedDestination);
5649
+ const isValid = Number(amount) > 0 && isValidAddress;
5650
+ const isDisabled = !isValid || isConfirming;
5651
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, { children: [
5652
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5596
5653
  Modal.Header,
5597
5654
  {
5598
- title: labels.withdraw.cardFlow.title,
5655
+ title: labels.withdraw.walletFlow.title,
5599
5656
  hideBorder: true,
5600
- leftElement: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5657
+ leftElement: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5601
5658
  "button",
5602
5659
  {
5603
5660
  type: "button",
5604
5661
  className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
5605
5662
  onClick: onBack,
5606
- "aria-label": "Go back",
5607
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
5663
+ "aria-label": labels.withdraw.back,
5664
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
5608
5665
  }
5609
5666
  )
5610
5667
  }
5611
5668
  ),
5612
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col gap-5", children: [
5613
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex gap-3 items-end", children: [
5614
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex-1 flex flex-col gap-2", children: [
5615
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.amountLabel }),
5616
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3", children: [
5617
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5618
- "input",
5619
- {
5620
- type: "text",
5621
- inputMode: "decimal",
5622
- "aria-label": labels.withdraw.cardFlow.amountLabel,
5623
- className: cn(
5624
- "agg-type-body w-full bg-transparent outline-none",
5625
- isValid ? "text-agg-foreground" : "text-agg-muted-foreground"
5626
- ),
5627
- placeholder: "0.00",
5628
- value: amount,
5629
- onChange: (event) => onAmountChange(event.target.value)
5630
- }
5631
- ),
5632
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "agg-type-body text-agg-muted-foreground", children: "$" })
5633
- ] })
5634
- ] }),
5635
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "w-[100px]", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5636
- Select,
5669
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-5", children: [
5670
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-2", children: [
5671
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.recipientAddressLabel }),
5672
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5673
+ "input",
5637
5674
  {
5638
- items: [{ value: currency, label: currency }],
5639
- value: currency,
5640
- onChange: onCurrencyChange,
5641
- ariaLabel: labels.withdraw.cardFlow.currencyLabel
5675
+ type: "text",
5676
+ "aria-label": labels.withdraw.walletFlow.recipientAddressLabel,
5677
+ className: cn(
5678
+ "agg-type-body w-full h-10 rounded border border-agg-separator bg-agg-secondary px-3 outline-none",
5679
+ "text-agg-foreground placeholder:text-agg-muted-foreground",
5680
+ "focus:border-agg-primary transition-colors"
5681
+ ),
5682
+ placeholder: isSolanaDest ? "FwR3..." : "0x971d...",
5683
+ value: destinationWallet,
5684
+ onChange: (e) => onDestinationChange(e.target.value)
5642
5685
  }
5643
- ) })
5686
+ )
5687
+ ] }),
5688
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-2", children: [
5689
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex items-center justify-between", children: [
5690
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.amountLabel }),
5691
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: balanceDisplay })
5692
+ ] }),
5693
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3 focus-within:border-agg-primary transition-colors", children: [
5694
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5695
+ "input",
5696
+ {
5697
+ type: "text",
5698
+ inputMode: "decimal",
5699
+ "aria-label": labels.withdraw.walletFlow.amountLabel,
5700
+ className: cn(
5701
+ "agg-type-body flex-1 min-w-0 bg-transparent outline-none",
5702
+ Number(amount) > 0 ? "text-agg-foreground" : "text-agg-muted-foreground"
5703
+ ),
5704
+ placeholder: "0.00",
5705
+ value: amount,
5706
+ onChange: (e) => onAmountChange(e.target.value)
5707
+ }
5708
+ ),
5709
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "agg-type-body text-agg-muted-foreground shrink-0", children: selectedToken }),
5710
+ onMaxClick ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5711
+ "button",
5712
+ {
5713
+ type: "button",
5714
+ className: "agg-type-label-strong text-agg-primary hover:opacity-80 transition-opacity cursor-pointer shrink-0",
5715
+ onClick: onMaxClick,
5716
+ children: labels.withdraw.walletFlow.max
5717
+ }
5718
+ ) : null
5719
+ ] })
5644
5720
  ] }),
5645
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex gap-5", children: [
5646
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex-1 flex flex-col gap-2 min-w-0", children: [
5647
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.tokenLabel }),
5648
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5721
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-3 sm:flex-row sm:gap-5", children: [
5722
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex-1 flex flex-col gap-2 min-w-0", children: [
5723
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.tokenLabel }),
5724
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5649
5725
  Select,
5650
5726
  {
5651
5727
  items: tokenOptions,
5652
5728
  value: selectedToken,
5653
5729
  onChange: onTokenChange,
5654
- ariaLabel: labels.withdraw.cardFlow.tokenLabel
5730
+ ariaLabel: labels.withdraw.walletFlow.tokenLabel
5655
5731
  }
5656
5732
  )
5657
5733
  ] }),
5658
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex-1 flex flex-col gap-2 min-w-0", children: [
5659
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.networkLabel }),
5660
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5734
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex-1 flex flex-col gap-2 min-w-0", children: [
5735
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.networkLabel }),
5736
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5661
5737
  Select,
5662
5738
  {
5663
5739
  items: networkOptions,
5664
5740
  value: selectedNetwork,
5665
5741
  onChange: onNetworkChange,
5666
- ariaLabel: labels.withdraw.cardFlow.networkLabel
5742
+ ariaLabel: labels.withdraw.walletFlow.networkLabel
5667
5743
  }
5668
5744
  )
5669
5745
  ] })
5670
5746
  ] }),
5671
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col gap-2", children: [
5672
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.destinationWalletLabel }),
5673
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "flex h-10 items-center rounded border border-agg-separator bg-agg-secondary px-3", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "agg-type-body truncate text-agg-foreground", children: destinationWallet }) })
5674
- ] }),
5675
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5747
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5676
5748
  Button,
5677
5749
  {
5678
- variant: isValid ? "primary" : "secondary",
5750
+ variant: isValid && !isConfirming ? "primary" : "secondary",
5679
5751
  size: "large",
5680
5752
  className: "w-full",
5681
- disabled: !isValid,
5753
+ disabled: isDisabled,
5682
5754
  onClick: onContinue,
5683
- children: labels.withdraw.cardFlow.getQuotes
5755
+ children: isConfirming ? labels.common.loading : labels.withdraw.walletFlow.confirm
5684
5756
  }
5685
- )
5757
+ ),
5758
+ error ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "agg-type-label text-agg-error text-center", role: "alert", children: error }) : null
5686
5759
  ] }) })
5687
5760
  ] });
5688
5761
  };
5689
5762
 
5690
- // src/withdraw/steps/withdraw-provider.tsx
5763
+ // src/withdraw/steps/withdraw-success.tsx
5764
+ var import_react9 = require("react");
5691
5765
  var import_hooks27 = require("@agg-build/hooks");
5692
- var import_jsx_runtime101 = require("react/jsx-runtime");
5693
- var WithdrawProviderItem = ({ provider, onSelect }) => {
5694
- const labels = (0, import_hooks27.useLabels)();
5695
- const badgeText = provider.badge === "best" ? labels.withdraw.cardFlow.providerBadges.best : provider.badge === "low-kyc" ? labels.withdraw.cardFlow.providerBadges.lowKyc : void 0;
5696
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5697
- "button",
5698
- {
5699
- type: "button",
5700
- className: "w-full rounded-xl border border-agg-separator px-4 py-3 text-left bg-agg-secondary hover:bg-agg-secondary-hover transition-colors cursor-pointer",
5701
- onClick: () => onSelect(provider.id),
5702
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
5703
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex items-center gap-2", children: [
5704
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: provider.name }),
5705
- badgeText ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5706
- "span",
5707
- {
5708
- className: `rounded border px-2 py-[2px] text-[10px] leading-[14px] font-agg-bold uppercase ${provider.badge === "best" ? "border-agg-primary/50 text-agg-primary bg-agg-secondary" : "border-agg-separator text-agg-foreground bg-agg-secondary"}`,
5709
- children: badgeText
5710
- }
5711
- ) : null
5712
- ] }),
5713
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex items-center gap-4", children: [
5714
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "text-right", children: [
5715
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "agg-type-body text-agg-foreground", children: provider.quote }),
5716
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
5717
- labels.withdraw.cardFlow.feeLabel,
5718
- " ",
5719
- provider.fee
5720
- ] })
5721
- ] }),
5722
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ChevronRightIcon, { className: "h-5 w-5 text-agg-muted-foreground" })
5723
- ] })
5724
- ] })
5725
- }
5726
- );
5766
+ var import_withdraw = require("@agg-build/hooks/withdraw");
5767
+
5768
+ // src/withdraw/steps/withdraw-success.utils.ts
5769
+ var CHAIN_LABELS = {
5770
+ 1: "Ethereum",
5771
+ 10: "Optimism",
5772
+ 56: "BNB Chain",
5773
+ 137: "Polygon",
5774
+ 8453: "Base",
5775
+ 42161: "Arbitrum",
5776
+ 43114: "Avalanche",
5777
+ 11155111: "Sepolia",
5778
+ 792703809: "Solana"
5779
+ };
5780
+ var resolveChainLabel = (chainId) => {
5781
+ var _a;
5782
+ return (_a = CHAIN_LABELS[chainId]) != null ? _a : `Chain ${chainId}`;
5783
+ };
5784
+ var legStepStatusFor = (legStatus) => {
5785
+ switch (legStatus) {
5786
+ case "confirmed":
5787
+ return "complete";
5788
+ case "failed":
5789
+ return "error";
5790
+ case "submitted":
5791
+ case "planned":
5792
+ default:
5793
+ return "pending";
5794
+ }
5727
5795
  };
5728
- var WithdrawProviderStep = ({
5729
- token,
5730
- amount,
5731
- currency,
5732
- providers,
5733
- onBack,
5734
- onSelectProvider
5796
+ var legStepLabel = (leg, labels) => {
5797
+ if (leg.type === "bridge") {
5798
+ return labels.bridge(resolveChainLabel(leg.sourceChainId), resolveChainLabel(leg.destChainId));
5799
+ }
5800
+ return labels.transfer(resolveChainLabel(leg.destChainId));
5801
+ };
5802
+ var finalStepStatusFor = (status) => {
5803
+ switch (status) {
5804
+ case "completed":
5805
+ return "complete";
5806
+ case "partial":
5807
+ return "warning";
5808
+ case "failed":
5809
+ return "error";
5810
+ case "pending":
5811
+ case "bridging":
5812
+ case "transferring":
5813
+ default:
5814
+ return "pending";
5815
+ }
5816
+ };
5817
+ var finalStepLabelFor = (status, pending, walletFlowLabels) => {
5818
+ var _a;
5819
+ if (pending || status === null) {
5820
+ return walletFlowLabels.lifecycle.pending;
5821
+ }
5822
+ return (_a = walletFlowLabels.lifecycle[status]) != null ? _a : walletFlowLabels.lifecycle.pending;
5823
+ };
5824
+ var buildWithdrawalLifecycleSteps = ({
5825
+ pending,
5826
+ status,
5827
+ legs,
5828
+ walletFlowLabels
5735
5829
  }) => {
5736
- const labels = (0, import_hooks27.useLabels)();
5737
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, { children: [
5738
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5739
- Modal.Header,
5740
- {
5741
- title: labels.withdraw.cardFlow.selectProviderTitle,
5742
- hideBorder: true,
5743
- leftElement: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5744
- "button",
5745
- {
5746
- type: "button",
5747
- className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
5748
- onClick: onBack,
5749
- "aria-label": labels.withdraw.back,
5750
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
5751
- }
5752
- )
5753
- }
5754
- ),
5755
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-4", children: [
5756
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("p", { className: "agg-type-body text-agg-foreground", children: [
5757
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "font-agg-bold", children: token }),
5758
- " $",
5759
- amount,
5760
- " ",
5761
- currency
5762
- ] }),
5763
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "flex flex-col gap-4", children: providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5764
- WithdrawProviderItem,
5765
- {
5766
- provider,
5767
- onSelect: onSelectProvider
5768
- },
5769
- provider.id
5770
- )) })
5771
- ] }) })
5772
- ] });
5830
+ const stepLabels = walletFlowLabels.lifecycle.steps;
5831
+ const legSteps = legs.map((leg, index) => ({
5832
+ id: `leg-${index}-${leg.type}-${leg.sourceChainId}-${leg.destChainId}`,
5833
+ label: legStepLabel(leg, stepLabels),
5834
+ status: legStepStatusFor(leg.status)
5835
+ }));
5836
+ const groups = legSteps.length > 0 ? [legSteps] : [];
5837
+ const finalStep = {
5838
+ id: `final-${status != null ? status : "pending"}`,
5839
+ label: finalStepLabelFor(status, pending, walletFlowLabels),
5840
+ status: finalStepStatusFor(status != null ? status : "pending")
5841
+ };
5842
+ return {
5843
+ groups,
5844
+ finalStep,
5845
+ hasDetails: legSteps.length > 0
5846
+ };
5773
5847
  };
5774
5848
 
5775
5849
  // src/withdraw/steps/withdraw-success.tsx
5776
- var import_hooks28 = require("@agg-build/hooks");
5777
5850
  var import_jsx_runtime102 = require("react/jsx-runtime");
5778
5851
  var SummaryRow3 = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
5779
5852
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label }),
5780
5853
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "agg-type-label text-agg-foreground", children: value })
5781
5854
  ] });
5855
+ var LoadingGlyph = ({
5856
+ className,
5857
+ enableAnimations
5858
+ }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5859
+ "span",
5860
+ {
5861
+ "aria-hidden": "true",
5862
+ className: cn(
5863
+ "inline-block rounded-full border-2 border-current border-r-transparent",
5864
+ getMotionClassName(enableAnimations, "animate-spin"),
5865
+ className
5866
+ )
5867
+ }
5868
+ );
5869
+ var stepIconClassNameFor = (status) => {
5870
+ switch (status) {
5871
+ case "complete":
5872
+ return "text-agg-primary";
5873
+ case "warning":
5874
+ return "text-agg-warning";
5875
+ case "error":
5876
+ return "text-agg-error";
5877
+ case "pending":
5878
+ default:
5879
+ return "text-agg-primary";
5880
+ }
5881
+ };
5882
+ var stepIconNameFor = (status) => {
5883
+ return status === "warning" || status === "error" ? "warning-filled" : "check-circle";
5884
+ };
5782
5885
  var WithdrawSuccessStep = ({
5783
5886
  summary,
5887
+ tokenSymbol,
5888
+ withdrawalId,
5784
5889
  onDone,
5785
5890
  onClose
5786
5891
  }) => {
5787
- const labels = (0, import_hooks28.useLabels)();
5892
+ var _a;
5893
+ const labels = (0, import_hooks27.useLabels)();
5894
+ const {
5895
+ features: { enableAnimations }
5896
+ } = (0, import_hooks27.useSdkUiConfig)();
5897
+ const { state } = (0, import_withdraw.useWithdrawalLifecycle)(withdrawalId);
5898
+ const [isTimelineExpanded, setIsTimelineExpanded] = (0, import_react9.useState)(true);
5899
+ const walletFlowLabels = labels.withdraw.walletFlow;
5900
+ const { groups, finalStep, hasDetails } = buildWithdrawalLifecycleSteps({
5901
+ pending: state.pending,
5902
+ status: state.status,
5903
+ legs: state.legs,
5904
+ walletFlowLabels
5905
+ });
5906
+ (0, import_react9.useEffect)(() => {
5907
+ if (!state.terminal) return;
5908
+ if (state.status !== "completed") return;
5909
+ const timer = window.setTimeout(() => onClose(), 1500);
5910
+ return () => window.clearTimeout(timer);
5911
+ }, [onClose, state.status, state.terminal]);
5912
+ const { titleCopy, descriptionCopy } = (() => {
5913
+ if (state.terminal && state.status === "completed") {
5914
+ return {
5915
+ titleCopy: walletFlowLabels.successTitleCompleted,
5916
+ descriptionCopy: walletFlowLabels.successDescriptionCompleted(tokenSymbol)
5917
+ };
5918
+ }
5919
+ if (state.terminal && state.status === "partial") {
5920
+ return {
5921
+ titleCopy: walletFlowLabels.successTitlePartial,
5922
+ descriptionCopy: walletFlowLabels.successDescriptionPartial(tokenSymbol)
5923
+ };
5924
+ }
5925
+ if (state.terminal && state.status === "failed") {
5926
+ return {
5927
+ titleCopy: walletFlowLabels.successTitleFailed,
5928
+ descriptionCopy: walletFlowLabels.successDescriptionFailed(tokenSymbol)
5929
+ };
5930
+ }
5931
+ return {
5932
+ titleCopy: walletFlowLabels.successTitle,
5933
+ descriptionCopy: walletFlowLabels.successDescription(tokenSymbol)
5934
+ };
5935
+ })();
5788
5936
  return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
5789
5937
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5790
5938
  "button",
5791
5939
  {
5792
5940
  type: "button",
5793
- className: "absolute right-8 top-7 flex items-center justify-center text-agg-foreground transition-colors hover:text-agg-foreground/80",
5941
+ className: "absolute right-8 top-7 flex items-center justify-center text-agg-foreground transition-colors hover:text-agg-foreground/80 cursor-pointer",
5794
5942
  onClick: onClose,
5795
5943
  "aria-label": labels.common.close,
5796
5944
  children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(CloseIcon, { className: "h-6 w-6" })
5797
5945
  }
5798
5946
  ),
5799
5947
  /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
5800
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full border border-agg-success/50 bg-agg-success/15", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SuccessCheckIcon, { className: "h-6 w-6 text-agg-success" }) }),
5801
5948
  /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
5802
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.withdraw.cardFlow.successTitle }),
5803
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "agg-type-body text-agg-foreground", children: labels.withdraw.cardFlow.successDescription })
5804
- ] }),
5805
- /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
5949
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: titleCopy }),
5806
5950
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5807
- SummaryRow3,
5951
+ "p",
5808
5952
  {
5809
- label: labels.withdraw.summary.amountReceived,
5810
- value: summary.amountReceived
5953
+ className: "agg-type-body text-agg-muted-foreground",
5954
+ "data-lifecycle-status": (_a = state.status) != null ? _a : "submitted",
5955
+ "data-lifecycle-terminal": state.terminal ? "true" : "false",
5956
+ children: descriptionCopy
5811
5957
  }
5812
5958
  ),
5813
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SummaryRow3, { label: labels.withdraw.summary.network, value: summary.network }),
5814
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5815
- SummaryRow3,
5959
+ state.errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "agg-type-body text-agg-destructive", children: state.errorMessage }) : null
5960
+ ] }),
5961
+ hasDetails || !state.pending ? /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "agg-withdraw-success-timeline flex w-full flex-col gap-2", children: [
5962
+ hasDetails ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5963
+ "div",
5816
5964
  {
5817
- label: labels.withdraw.cardFlow.summary.provider,
5818
- value: summary.provider
5965
+ "aria-hidden": !isTimelineExpanded,
5966
+ className: cn(
5967
+ "grid overflow-hidden",
5968
+ isTimelineExpanded ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0",
5969
+ !isTimelineExpanded && "pointer-events-none",
5970
+ getMotionClassName(
5971
+ enableAnimations,
5972
+ "transition-[grid-template-rows,opacity] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]"
5973
+ )
5974
+ ),
5975
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex flex-col gap-4 pb-2", children: groups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5976
+ "div",
5977
+ {
5978
+ className: "flex flex-col gap-2",
5979
+ children: group.map((step) => /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
5980
+ "div",
5981
+ {
5982
+ className: "flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
5983
+ "data-step-status": step.status,
5984
+ children: [
5985
+ step.status === "pending" ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5986
+ LoadingGlyph,
5987
+ {
5988
+ enableAnimations,
5989
+ className: cn(
5990
+ "h-3 w-3 shrink-0",
5991
+ stepIconClassNameFor(step.status)
5992
+ )
5993
+ }
5994
+ ) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5995
+ Icon,
5996
+ {
5997
+ name: stepIconNameFor(step.status),
5998
+ size: "small",
5999
+ className: cn(
6000
+ "h-3 w-3 shrink-0",
6001
+ stepIconClassNameFor(step.status)
6002
+ ),
6003
+ "aria-hidden": "true"
6004
+ }
6005
+ ),
6006
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "min-w-0 flex-1", children: step.label })
6007
+ ]
6008
+ },
6009
+ step.id
6010
+ ))
6011
+ },
6012
+ `withdraw-step-group-${groupIndex}`
6013
+ )) }) })
5819
6014
  }
5820
- ),
6015
+ ) : null,
6016
+ hasDetails ? /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
6017
+ "button",
6018
+ {
6019
+ type: "button",
6020
+ "aria-expanded": isTimelineExpanded,
6021
+ className: cn(
6022
+ "flex w-full items-center gap-2 text-left text-agg-sm leading-agg-5 text-agg-foreground",
6023
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary focus-visible:ring-offset-0 focus-visible:ring-offset-agg-secondary",
6024
+ "cursor-pointer"
6025
+ ),
6026
+ onClick: () => setIsTimelineExpanded((current) => !current),
6027
+ children: [
6028
+ finalStep.status === "pending" ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6029
+ LoadingGlyph,
6030
+ {
6031
+ enableAnimations,
6032
+ className: cn("h-3 w-3 shrink-0", stepIconClassNameFor(finalStep.status))
6033
+ }
6034
+ ) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6035
+ Icon,
6036
+ {
6037
+ name: stepIconNameFor(finalStep.status),
6038
+ size: "small",
6039
+ className: cn("h-3 w-3 shrink-0", stepIconClassNameFor(finalStep.status)),
6040
+ "aria-hidden": "true"
6041
+ }
6042
+ ),
6043
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "min-w-0 flex-1", children: finalStep.label }),
6044
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6045
+ Icon,
6046
+ {
6047
+ name: isTimelineExpanded ? "chevron-up" : "chevron-down",
6048
+ size: "small",
6049
+ className: "h-4 w-4 shrink-0 text-agg-muted-foreground",
6050
+ "aria-hidden": "true"
6051
+ }
6052
+ )
6053
+ ]
6054
+ }
6055
+ ) : null
6056
+ ] }) : null,
6057
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
5821
6058
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5822
6059
  SummaryRow3,
5823
6060
  {
5824
- label: labels.withdraw.cardFlow.summary.toWallet,
5825
- value: summary.toWallet
6061
+ label: walletFlowLabels.summary.amountReceived,
6062
+ value: summary.amountReceived
5826
6063
  }
5827
6064
  ),
5828
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SummaryRow3, { label: labels.withdraw.cardFlow.summary.fees, value: summary.fees })
6065
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SummaryRow3, { label: walletFlowLabels.summary.network, value: summary.network }),
6066
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SummaryRow3, { label: walletFlowLabels.summary.toWallet, value: summary.toWallet }),
6067
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SummaryRow3, { label: walletFlowLabels.summary.fees, value: summary.fees })
5829
6068
  ] }),
5830
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onDone, children: labels.withdraw.done })
6069
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Button, { variant: "secondary", size: "large", className: "w-[160px]", onClick: onDone, children: labels.withdraw.done })
5831
6070
  ] })
5832
6071
  ] }) });
5833
6072
  };
5834
6073
 
5835
6074
  // src/withdraw/index.tsx
5836
6075
  var import_jsx_runtime103 = require("react/jsx-runtime");
5837
- var WithdrawModal = ({
6076
+ function isControlledWithdrawModalProps(props) {
6077
+ return "withdrawFlow" in props;
6078
+ }
6079
+ function WithdrawModalSelfDriven({
6080
+ open,
6081
+ onOpenChange
6082
+ }) {
6083
+ const withdrawProps = (0, import_withdraw2.useWithdrawFlow)({ open, onOpenChange });
6084
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(WithdrawModalControlled, __spreadValues({}, withdrawProps));
6085
+ }
6086
+ function WithdrawModalControlled({
5838
6087
  open,
5839
6088
  onOpenChange,
5840
6089
  withdrawFlow,
5841
- onSelectWithdrawMethod,
6090
+ onWithdrawDestinationChange,
5842
6091
  onWithdrawAmountChange,
5843
- onWithdrawCurrencyChange,
5844
6092
  onWithdrawTokenChange,
5845
6093
  onWithdrawNetworkChange,
5846
- onGetWithdrawQuotes,
6094
+ onMaxClick,
5847
6095
  onSelectWithdrawProvider,
5848
6096
  onDoneWithdraw
5849
- }) => {
5850
- const [step, setStep] = (0, import_react9.useState)("method");
5851
- const handleBackToMethod = () => {
5852
- setStep("method");
5853
- };
5854
- const handleSelectMethod = (method) => {
5855
- setStep("withdraw-amount");
5856
- onSelectWithdrawMethod == null ? void 0 : onSelectWithdrawMethod(method);
5857
- };
6097
+ }) {
6098
+ const [step, setStep] = (0, import_react10.useState)("method");
6099
+ const [isConfirming, setIsConfirming] = (0, import_react10.useState)(false);
6100
+ const [confirmError, setConfirmError] = (0, import_react10.useState)(null);
6101
+ (0, import_react10.useEffect)(() => {
6102
+ if (!open) {
6103
+ setStep("method");
6104
+ setIsConfirming(false);
6105
+ setConfirmError(null);
6106
+ }
6107
+ }, [open]);
5858
6108
  const handleOpenChange = (isOpen) => {
5859
6109
  if (!isOpen) {
5860
6110
  setStep("method");
6111
+ setIsConfirming(false);
6112
+ setConfirmError(null);
5861
6113
  }
5862
6114
  onOpenChange(isOpen);
5863
6115
  };
5864
- const fallbackNetworkOptions = (0, import_react9.useMemo)(() => mapNetworksToOptions(), []);
5865
- const withdrawTokenOptions = withTokenIcons(
5866
- mergeSelectOptionsUnique(withdrawFlow.tokenOptions, DEFAULT_CURRENCY_OPTIONS)
5867
- );
5868
- const withdrawNetworkOptions = withNetworkIcons(
5869
- mergeSelectOptionsUnique(withdrawFlow.networkOptions, fallbackNetworkOptions)
5870
- );
6116
+ const handleBack = () => {
6117
+ setConfirmError(null);
6118
+ setStep("method");
6119
+ };
6120
+ const handleConfirm = () => __async(null, null, function* () {
6121
+ setIsConfirming(true);
6122
+ setConfirmError(null);
6123
+ try {
6124
+ yield onSelectWithdrawProvider("wallet");
6125
+ setStep("success");
6126
+ } catch (err) {
6127
+ setConfirmError(err instanceof Error ? err.message : "Withdrawal failed. Please try again.");
6128
+ } finally {
6129
+ setIsConfirming(false);
6130
+ }
6131
+ });
6132
+ const withdrawTokenOptions = withTokenIcons(withdrawFlow.tokenOptions);
6133
+ const withdrawNetworkOptions = withNetworkIcons(withdrawFlow.networkOptions);
5871
6134
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Modal.Container, { maxWidth: "600px", "aria-label": "Withdraw", children: [
5872
- step === "method" ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(WithdrawMethodStep, { balance: withdrawFlow.balance, onSelectMethod: handleSelectMethod }) : null,
6135
+ step === "method" ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6136
+ WithdrawMethodStep,
6137
+ {
6138
+ balance: withdrawFlow.balance,
6139
+ onSelectMethod: () => setStep("withdraw-amount")
6140
+ }
6141
+ ) : null,
5873
6142
  step === "withdraw-amount" ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
5874
6143
  WithdrawAmountStep,
5875
6144
  {
5876
6145
  amount: withdrawFlow.amount,
5877
- currency: withdrawFlow.currency,
5878
6146
  destinationWallet: withdrawFlow.destinationWallet,
6147
+ balanceDisplay: withdrawFlow.balanceDisplay,
5879
6148
  tokenOptions: withdrawTokenOptions,
5880
6149
  networkOptions: withdrawNetworkOptions,
5881
6150
  selectedToken: withdrawFlow.selectedToken,
5882
6151
  selectedNetwork: withdrawFlow.selectedNetwork,
5883
- onBack: handleBackToMethod,
6152
+ isConfirming,
6153
+ error: confirmError,
6154
+ onBack: handleBack,
5884
6155
  onAmountChange: onWithdrawAmountChange,
5885
- onCurrencyChange: onWithdrawCurrencyChange,
6156
+ onDestinationChange: onWithdrawDestinationChange,
5886
6157
  onTokenChange: onWithdrawTokenChange,
5887
6158
  onNetworkChange: onWithdrawNetworkChange,
5888
- onContinue: () => {
5889
- onGetWithdrawQuotes == null ? void 0 : onGetWithdrawQuotes();
5890
- setStep("provider");
5891
- }
5892
- }
5893
- ) : null,
5894
- step === "provider" ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
5895
- WithdrawProviderStep,
5896
- {
5897
- token: withdrawFlow.selectedToken,
5898
- amount: withdrawFlow.amount,
5899
- currency: withdrawFlow.currency,
5900
- providers: withdrawFlow.providers,
5901
- onBack: () => setStep("withdraw-amount"),
5902
- onSelectProvider: (providerId) => {
5903
- onSelectWithdrawProvider(providerId);
5904
- setStep("success");
5905
- }
6159
+ onMaxClick,
6160
+ onContinue: handleConfirm
5906
6161
  }
5907
6162
  ) : null,
5908
6163
  step === "success" ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
5909
6164
  WithdrawSuccessStep,
5910
6165
  {
5911
6166
  summary: withdrawFlow.purchaseSummary,
6167
+ tokenSymbol: withdrawFlow.selectedToken,
6168
+ withdrawalId: withdrawFlow.withdrawalId,
5912
6169
  onDone: onDoneWithdraw,
5913
- onClose: () => onOpenChange(false)
6170
+ onClose: () => handleOpenChange(false)
5914
6171
  }
5915
6172
  ) : null
5916
6173
  ] }) });
6174
+ }
6175
+ var WithdrawModal = (props) => {
6176
+ if (isControlledWithdrawModalProps(props)) {
6177
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(WithdrawModalControlled, __spreadValues({}, props));
6178
+ }
6179
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(WithdrawModalSelfDriven, __spreadValues({}, props));
5917
6180
  };
5918
6181
  WithdrawModal.displayName = "WithdrawModal";
5919
6182
 
5920
6183
  // src/onboarding/index.tsx
5921
- var import_react14 = require("react");
5922
- var import_hooks35 = require("@agg-build/hooks");
6184
+ var import_react15 = require("react");
6185
+ var import_hooks34 = require("@agg-build/hooks");
5923
6186
  var Dialog4 = __toESM(require("@radix-ui/react-dialog"));
5924
6187
 
5925
6188
  // src/onboarding/onboarding-modal.constants.ts
@@ -5938,8 +6201,8 @@ var ONBOARDING_STEPS = {
5938
6201
  var ONCHAIN_VENUES = [import_sdk10.Venue.polymarket, import_sdk10.Venue.opinion, import_sdk10.Venue.predict];
5939
6202
 
5940
6203
  // src/onboarding/steps/how-it-works.tsx
5941
- var import_react10 = require("react");
5942
- var import_hooks29 = require("@agg-build/hooks");
6204
+ var import_react11 = require("react");
6205
+ var import_hooks28 = require("@agg-build/hooks");
5943
6206
  var import_jsx_runtime104 = require("react/jsx-runtime");
5944
6207
  var defaultIcons = {
5945
6208
  createAccount: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
@@ -5948,11 +6211,11 @@ var defaultIcons = {
5948
6211
  stayInControl: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
5949
6212
  };
5950
6213
  var HowItWorksStep = ({ onContinue, icons }) => {
5951
- const labels = (0, import_hooks29.useLabels)();
5952
- const scrollRef = (0, import_react10.useRef)(null);
5953
- const [showTopGradient, setShowTopGradient] = (0, import_react10.useState)(false);
5954
- const [showBottomGradient, setShowBottomGradient] = (0, import_react10.useState)(true);
5955
- const handleScroll = (0, import_react10.useCallback)(() => {
6214
+ const labels = (0, import_hooks28.useLabels)();
6215
+ const scrollRef = (0, import_react11.useRef)(null);
6216
+ const [showTopGradient, setShowTopGradient] = (0, import_react11.useState)(false);
6217
+ const [showBottomGradient, setShowBottomGradient] = (0, import_react11.useState)(true);
6218
+ const handleScroll = (0, import_react11.useCallback)(() => {
5956
6219
  const el = scrollRef.current;
5957
6220
  if (!el) return;
5958
6221
  setShowTopGradient(el.scrollTop > 0);
@@ -6021,11 +6284,11 @@ var HowItWorksStep = ({ onContinue, icons }) => {
6021
6284
  HowItWorksStep.displayName = "HowItWorksStep";
6022
6285
 
6023
6286
  // src/onboarding/steps/profile-setup.tsx
6024
- var import_react11 = require("react");
6025
- var import_hooks31 = require("@agg-build/hooks");
6287
+ var import_react12 = require("react");
6288
+ var import_hooks30 = require("@agg-build/hooks");
6026
6289
 
6027
6290
  // src/primitives/venue-logo/index.tsx
6028
- var import_hooks30 = require("@agg-build/hooks");
6291
+ var import_hooks29 = require("@agg-build/hooks");
6029
6292
 
6030
6293
  // src/primitives/venue-logo/venue-logo.utils.ts
6031
6294
  var resolveVenueLogoLabel = ({
@@ -6058,7 +6321,7 @@ var VenueLogo = ({
6058
6321
  title
6059
6322
  }) => {
6060
6323
  var _a, _b;
6061
- const labels = (0, import_hooks30.useLabels)();
6324
+ const labels = (0, import_hooks29.useLabels)();
6062
6325
  const sizeClass = sizeClasses[size];
6063
6326
  const resolvedLabel = resolveVenueLogoLabel({
6064
6327
  ariaLabel,
@@ -6102,16 +6365,16 @@ VenueLogo.displayName = "VenueLogo";
6102
6365
  // src/onboarding/steps/profile-setup.tsx
6103
6366
  var import_jsx_runtime106 = require("react/jsx-runtime");
6104
6367
  var ProfileSetupStep = ({ onContinue }) => {
6105
- const labels = (0, import_hooks31.useLabels)();
6106
- const [username, setUsername] = (0, import_react11.useState)("");
6107
- const [avatarFile, setAvatarFile] = (0, import_react11.useState)();
6108
- const [avatarPreview, setAvatarPreview] = (0, import_react11.useState)();
6109
- const fileInputRef = (0, import_react11.useRef)(null);
6110
- const handleAvatarClick = (0, import_react11.useCallback)(() => {
6368
+ const labels = (0, import_hooks30.useLabels)();
6369
+ const [username, setUsername] = (0, import_react12.useState)("");
6370
+ const [avatarFile, setAvatarFile] = (0, import_react12.useState)();
6371
+ const [avatarPreview, setAvatarPreview] = (0, import_react12.useState)();
6372
+ const fileInputRef = (0, import_react12.useRef)(null);
6373
+ const handleAvatarClick = (0, import_react12.useCallback)(() => {
6111
6374
  var _a;
6112
6375
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
6113
6376
  }, []);
6114
- const handleFileChange = (0, import_react11.useCallback)((e) => {
6377
+ const handleFileChange = (0, import_react12.useCallback)((e) => {
6115
6378
  var _a;
6116
6379
  const file = (_a = e.target.files) == null ? void 0 : _a[0];
6117
6380
  if (!file) return;
@@ -6123,7 +6386,7 @@ var ProfileSetupStep = ({ onContinue }) => {
6123
6386
  };
6124
6387
  reader.readAsDataURL(file);
6125
6388
  }, []);
6126
- const handleContinue = (0, import_react11.useCallback)(() => {
6389
+ const handleContinue = (0, import_react12.useCallback)(() => {
6127
6390
  onContinue({
6128
6391
  username,
6129
6392
  avatarFile,
@@ -6233,7 +6496,7 @@ ProfileSetupStep.displayName = "ProfileSetupStep";
6233
6496
 
6234
6497
  // src/onboarding/steps/connect-accounts.tsx
6235
6498
  var import_sdk11 = require("@agg-build/sdk");
6236
- var import_hooks32 = require("@agg-build/hooks");
6499
+ var import_hooks31 = require("@agg-build/hooks");
6237
6500
  var import_jsx_runtime107 = require("react/jsx-runtime");
6238
6501
  var OnchainVenueLogos = () => {
6239
6502
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
@@ -6247,7 +6510,7 @@ var VenueCard = ({
6247
6510
  onConnect,
6248
6511
  connected = false
6249
6512
  }) => {
6250
- const labels = (0, import_hooks32.useLabels)();
6513
+ const labels = (0, import_hooks31.useLabels)();
6251
6514
  const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
6252
6515
  Button,
6253
6516
  {
@@ -6308,7 +6571,7 @@ var ConnectAccountsStep = ({
6308
6571
  connectedOnchain = false,
6309
6572
  connectedKalshi = false
6310
6573
  }) => {
6311
- const labels = (0, import_hooks32.useLabels)();
6574
+ const labels = (0, import_hooks31.useLabels)();
6312
6575
  const canContinue = connectedOnchain || connectedKalshi;
6313
6576
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex flex-col gap-6", children: [
6314
6577
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
@@ -6365,8 +6628,8 @@ ConnectAccountsStep.displayName = "ConnectAccountsStep";
6365
6628
 
6366
6629
  // src/onboarding/steps/connect-kalshi-modal.tsx
6367
6630
  var import_sdk12 = require("@agg-build/sdk");
6368
- var import_react12 = require("react");
6369
- var import_hooks33 = require("@agg-build/hooks");
6631
+ var import_react13 = require("react");
6632
+ var import_hooks32 = require("@agg-build/hooks");
6370
6633
  var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
6371
6634
  var import_jsx_runtime108 = require("react/jsx-runtime");
6372
6635
  var ConnectKalshiModal = ({
@@ -6374,16 +6637,16 @@ var ConnectKalshiModal = ({
6374
6637
  onOpenChange,
6375
6638
  onVerify
6376
6639
  }) => {
6377
- const labels = (0, import_hooks33.useLabels)();
6378
- const [apiKeyId, setApiKeyId] = (0, import_react12.useState)("");
6379
- const [privateKey, setPrivateKey] = (0, import_react12.useState)("");
6380
- const [verifying, setVerifying] = (0, import_react12.useState)(false);
6381
- const [error, setError] = (0, import_react12.useState)();
6640
+ const labels = (0, import_hooks32.useLabels)();
6641
+ const [apiKeyId, setApiKeyId] = (0, import_react13.useState)("");
6642
+ const [privateKey, setPrivateKey] = (0, import_react13.useState)("");
6643
+ const [verifying, setVerifying] = (0, import_react13.useState)(false);
6644
+ const [error, setError] = (0, import_react13.useState)();
6382
6645
  const canVerify = apiKeyId.trim().length > 0 && privateKey.trim().length > 0;
6383
- const handleCancel = (0, import_react12.useCallback)(() => {
6646
+ const handleCancel = (0, import_react13.useCallback)(() => {
6384
6647
  onOpenChange(false);
6385
6648
  }, [onOpenChange]);
6386
- const handleVerify = (0, import_react12.useCallback)(() => __async(null, null, function* () {
6649
+ const handleVerify = (0, import_react13.useCallback)(() => __async(null, null, function* () {
6387
6650
  if (!canVerify || verifying) return;
6388
6651
  setVerifying(true);
6389
6652
  setError(void 0);
@@ -6412,7 +6675,7 @@ var ConnectKalshiModal = ({
6412
6675
  privateKey,
6413
6676
  verifying
6414
6677
  ]);
6415
- const handleOpenChange = (0, import_react12.useCallback)(
6678
+ const handleOpenChange = (0, import_react13.useCallback)(
6416
6679
  (value) => {
6417
6680
  if (value) {
6418
6681
  setApiKeyId("");
@@ -6615,8 +6878,8 @@ var ConnectKalshiModal = ({
6615
6878
  ConnectKalshiModal.displayName = "ConnectKalshiModal";
6616
6879
 
6617
6880
  // src/onboarding/steps/connect-onchain-modal.tsx
6618
- var import_react13 = require("react");
6619
- var import_hooks34 = require("@agg-build/hooks");
6881
+ var import_react14 = require("react");
6882
+ var import_hooks33 = require("@agg-build/hooks");
6620
6883
  var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
6621
6884
  var import_jsx_runtime109 = require("react/jsx-runtime");
6622
6885
  var ConnectOnchainModal = ({
@@ -6624,13 +6887,13 @@ var ConnectOnchainModal = ({
6624
6887
  onOpenChange,
6625
6888
  onConnect
6626
6889
  }) => {
6627
- const labels = (0, import_hooks34.useLabels)();
6628
- const [connecting, setConnecting] = (0, import_react13.useState)(false);
6629
- const [error, setError] = (0, import_react13.useState)();
6630
- const handleCancel = (0, import_react13.useCallback)(() => {
6890
+ const labels = (0, import_hooks33.useLabels)();
6891
+ const [connecting, setConnecting] = (0, import_react14.useState)(false);
6892
+ const [error, setError] = (0, import_react14.useState)();
6893
+ const handleCancel = (0, import_react14.useCallback)(() => {
6631
6894
  onOpenChange(false);
6632
6895
  }, [onOpenChange]);
6633
- const handleConnect = (0, import_react13.useCallback)(() => __async(null, null, function* () {
6896
+ const handleConnect = (0, import_react14.useCallback)(() => __async(null, null, function* () {
6634
6897
  if (connecting) return;
6635
6898
  setConnecting(true);
6636
6899
  setError(void 0);
@@ -6645,7 +6908,7 @@ var ConnectOnchainModal = ({
6645
6908
  setConnecting(false);
6646
6909
  }
6647
6910
  }), [connecting, labels.onboarding.connectOnchainModal.fallbackError, onConnect, onOpenChange]);
6648
- const handleOpenChange = (0, import_react13.useCallback)(
6911
+ const handleOpenChange = (0, import_react14.useCallback)(
6649
6912
  (value) => {
6650
6913
  if (value) {
6651
6914
  setError(void 0);
@@ -6736,49 +6999,49 @@ var OnboardingModal = ({
6736
6999
  connectedKalshi = false
6737
7000
  }) => {
6738
7001
  var _a;
6739
- const labels = (0, import_hooks35.useLabels)();
6740
- const [step, setStep] = (0, import_react14.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
7002
+ const labels = (0, import_hooks34.useLabels)();
7003
+ const [step, setStep] = (0, import_react15.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
6741
7004
  const stepLabels = {
6742
7005
  [ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
6743
7006
  [ONBOARDING_STEPS.PROFILE_SETUP]: labels.onboarding.modal.stepProfileSetup,
6744
7007
  [ONBOARDING_STEPS.CONNECT_ACCOUNTS]: labels.onboarding.modal.stepConnectAccounts
6745
7008
  };
6746
7009
  const resolvedTitle = (_a = stepLabels[step]) != null ? _a : labels.onboarding.modal.title;
6747
- const [kalshiModalOpen, setKalshiModalOpen] = (0, import_react14.useState)(false);
6748
- const [kalshiConnected, setKalshiConnected] = (0, import_react14.useState)(false);
6749
- const [onchainModalOpen, setOnchainModalOpen] = (0, import_react14.useState)(false);
6750
- const [onchainConnected, setOnchainConnected] = (0, import_react14.useState)(false);
6751
- (0, import_react14.useEffect)(() => {
7010
+ const [kalshiModalOpen, setKalshiModalOpen] = (0, import_react15.useState)(false);
7011
+ const [kalshiConnected, setKalshiConnected] = (0, import_react15.useState)(false);
7012
+ const [onchainModalOpen, setOnchainModalOpen] = (0, import_react15.useState)(false);
7013
+ const [onchainConnected, setOnchainConnected] = (0, import_react15.useState)(false);
7014
+ (0, import_react15.useEffect)(() => {
6752
7015
  if (open) {
6753
7016
  setStep(ONBOARDING_STEPS.HOW_IT_WORKS);
6754
7017
  setKalshiConnected(false);
6755
7018
  setOnchainConnected(false);
6756
7019
  }
6757
7020
  }, [open]);
6758
- const handleHowItWorksContinue = (0, import_react14.useCallback)(() => {
7021
+ const handleHowItWorksContinue = (0, import_react15.useCallback)(() => {
6759
7022
  setStep(ONBOARDING_STEPS.PROFILE_SETUP);
6760
7023
  }, []);
6761
- const handleProfileContinue = (0, import_react14.useCallback)(
7024
+ const handleProfileContinue = (0, import_react15.useCallback)(
6762
7025
  (data) => {
6763
7026
  onProfileSubmit == null ? void 0 : onProfileSubmit(data);
6764
7027
  setStep(ONBOARDING_STEPS.CONNECT_ACCOUNTS);
6765
7028
  },
6766
7029
  [onProfileSubmit]
6767
7030
  );
6768
- const handleConnectContinue = (0, import_react14.useCallback)(() => {
7031
+ const handleConnectContinue = (0, import_react15.useCallback)(() => {
6769
7032
  onComplete == null ? void 0 : onComplete();
6770
7033
  }, [onComplete]);
6771
- const handleOpenOnchainModal = (0, import_react14.useCallback)(() => {
7034
+ const handleOpenOnchainModal = (0, import_react15.useCallback)(() => {
6772
7035
  setOnchainModalOpen(true);
6773
7036
  }, []);
6774
- const handleOnchainConnect = (0, import_react14.useCallback)(() => __async(null, null, function* () {
7037
+ const handleOnchainConnect = (0, import_react15.useCallback)(() => __async(null, null, function* () {
6775
7038
  yield onConnectOnchain == null ? void 0 : onConnectOnchain();
6776
7039
  setOnchainConnected(true);
6777
7040
  }), [onConnectOnchain]);
6778
- const handleOpenKalshiModal = (0, import_react14.useCallback)(() => {
7041
+ const handleOpenKalshiModal = (0, import_react15.useCallback)(() => {
6779
7042
  setKalshiModalOpen(true);
6780
7043
  }, []);
6781
- const handleKalshiVerify = (0, import_react14.useCallback)(
7044
+ const handleKalshiVerify = (0, import_react15.useCallback)(
6782
7045
  (credentials) => __async(null, null, function* () {
6783
7046
  yield onConnectKalshi == null ? void 0 : onConnectKalshi(credentials);
6784
7047
  setKalshiConnected(true);
@@ -6833,8 +7096,8 @@ OnboardingModal.displayName = "OnboardingModal";
6833
7096
 
6834
7097
  // src/profile/index.tsx
6835
7098
  var import_sdk13 = require("@agg-build/sdk");
6836
- var import_react17 = require("react");
6837
- var import_hooks38 = require("@agg-build/hooks");
7099
+ var import_react18 = require("react");
7100
+ var import_hooks37 = require("@agg-build/hooks");
6838
7101
 
6839
7102
  // src/profile/profile-modal.constants.ts
6840
7103
  var PROFILE_TAB_KEYS = {
@@ -6851,8 +7114,8 @@ var PROFILE_TAB_ITEMS = [
6851
7114
  ];
6852
7115
 
6853
7116
  // src/profile/tabs/about-tab.tsx
6854
- var import_react15 = require("react");
6855
- var import_hooks36 = require("@agg-build/hooks");
7117
+ var import_react16 = require("react");
7118
+ var import_hooks35 = require("@agg-build/hooks");
6856
7119
  var import_jsx_runtime111 = require("react/jsx-runtime");
6857
7120
  var AboutTab = ({
6858
7121
  avatarPreview,
@@ -6863,13 +7126,13 @@ var AboutTab = ({
6863
7126
  draftAvatarPreview,
6864
7127
  avatarError: _avatarError
6865
7128
  }) => {
6866
- const labels = (0, import_hooks36.useLabels)();
6867
- const fileInputRef = (0, import_react15.useRef)(null);
6868
- const handleAvatarClick = (0, import_react15.useCallback)(() => {
7129
+ const labels = (0, import_hooks35.useLabels)();
7130
+ const fileInputRef = (0, import_react16.useRef)(null);
7131
+ const handleAvatarClick = (0, import_react16.useCallback)(() => {
6869
7132
  var _a;
6870
7133
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
6871
7134
  }, []);
6872
- const handleFileChange = (0, import_react15.useCallback)(
7135
+ const handleFileChange = (0, import_react16.useCallback)(
6873
7136
  (e) => {
6874
7137
  var _a;
6875
7138
  const file = (_a = e.target.files) == null ? void 0 : _a[0];
@@ -6983,8 +7246,8 @@ var AboutTab = ({
6983
7246
  AboutTab.displayName = "AboutTab";
6984
7247
 
6985
7248
  // src/profile/tabs/accounts-wallets-tab.tsx
6986
- var import_react16 = require("react");
6987
- var import_hooks37 = require("@agg-build/hooks");
7249
+ var import_react17 = require("react");
7250
+ var import_hooks36 = require("@agg-build/hooks");
6988
7251
  var import_jsx_runtime112 = require("react/jsx-runtime");
6989
7252
  var SectionTitle = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
6990
7253
  var AccountRow = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
@@ -7019,14 +7282,14 @@ var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runti
7019
7282
  );
7020
7283
  var TRADING_ACCESS_VENUES = ["kalshi", "polymarket", "opinion", "predict"];
7021
7284
  var VerifyIdentityButton = ({ onError }) => {
7022
- const client = (0, import_hooks37.useAggClient)();
7023
- const [isInitiating, setIsInitiating] = (0, import_react16.useState)(false);
7024
- const [needsDepositAddress, setNeedsDepositAddress] = (0, import_react16.useState)(false);
7025
- const { isReady, isTimedOut } = (0, import_hooks37.useDepositAddresses)({
7285
+ const client = (0, import_hooks36.useAggClient)();
7286
+ const [isInitiating, setIsInitiating] = (0, import_react17.useState)(false);
7287
+ const [needsDepositAddress, setNeedsDepositAddress] = (0, import_react17.useState)(false);
7288
+ const { isReady, isTimedOut } = (0, import_hooks36.useDepositAddresses)({
7026
7289
  enabled: needsDepositAddress,
7027
7290
  poll: true
7028
7291
  });
7029
- (0, import_react16.useEffect)(() => {
7292
+ (0, import_react17.useEffect)(() => {
7030
7293
  if (!isInitiating || !isReady) return;
7031
7294
  const redirectUri = window.location.href;
7032
7295
  client.initiateKyc("kalshi", redirectUri).then((res) => {
@@ -7040,14 +7303,14 @@ var VerifyIdentityButton = ({ onError }) => {
7040
7303
  setNeedsDepositAddress(false);
7041
7304
  });
7042
7305
  }, [isReady, isInitiating, client, onError]);
7043
- (0, import_react16.useEffect)(() => {
7306
+ (0, import_react17.useEffect)(() => {
7044
7307
  if (isTimedOut && isInitiating) {
7045
7308
  setIsInitiating(false);
7046
7309
  setNeedsDepositAddress(false);
7047
7310
  onError == null ? void 0 : onError(new Error("Deposit address provisioning timed out"));
7048
7311
  }
7049
7312
  }, [isTimedOut, isInitiating, onError]);
7050
- const handleClick = (0, import_react16.useCallback)(() => {
7313
+ const handleClick = (0, import_react17.useCallback)(() => {
7051
7314
  setIsInitiating(true);
7052
7315
  setNeedsDepositAddress(true);
7053
7316
  }, []);
@@ -7210,20 +7473,20 @@ var ProfileModal = ({
7210
7473
  onKycError
7211
7474
  }) => {
7212
7475
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
7213
- const client = (0, import_hooks38.useAggClient)();
7214
- const { user, startAuth } = (0, import_hooks38.useAggAuthState)();
7215
- const [activeTab, setActiveTab] = (0, import_react17.useState)(PROFILE_TAB_KEYS.ABOUT);
7476
+ const client = (0, import_hooks37.useAggClient)();
7477
+ const { user, startAuth } = (0, import_hooks37.useAggAuthState)();
7478
+ const [activeTab, setActiveTab] = (0, import_react18.useState)(PROFILE_TAB_KEYS.ABOUT);
7216
7479
  const resolvedInitialUsername = (_a = username != null ? username : user == null ? void 0 : user.username) != null ? _a : "";
7217
- const [draftUsername, setDraftUsername] = (0, import_react17.useState)(resolvedInitialUsername);
7218
- const [draftAvatarFile, setDraftAvatarFile] = (0, import_react17.useState)();
7219
- const [draftAvatarPreview, setDraftAvatarPreview] = (0, import_react17.useState)();
7220
- const [isSaving, setIsSaving] = (0, import_react17.useState)(false);
7221
- const [avatarTypeError, setAvatarTypeError] = (0, import_react17.useState)(null);
7222
- (0, import_react17.useEffect)(() => {
7480
+ const [draftUsername, setDraftUsername] = (0, import_react18.useState)(resolvedInitialUsername);
7481
+ const [draftAvatarFile, setDraftAvatarFile] = (0, import_react18.useState)();
7482
+ const [draftAvatarPreview, setDraftAvatarPreview] = (0, import_react18.useState)();
7483
+ const [isSaving, setIsSaving] = (0, import_react18.useState)(false);
7484
+ const [avatarTypeError, setAvatarTypeError] = (0, import_react18.useState)(null);
7485
+ (0, import_react18.useEffect)(() => {
7223
7486
  var _a2;
7224
7487
  setDraftUsername((_a2 = username != null ? username : user == null ? void 0 : user.username) != null ? _a2 : "");
7225
7488
  }, [username, user == null ? void 0 : user.username]);
7226
- const handleOpenChange = (0, import_react17.useCallback)(
7489
+ const handleOpenChange = (0, import_react18.useCallback)(
7227
7490
  (isOpen) => {
7228
7491
  var _a2;
7229
7492
  if (!isOpen) {
@@ -7247,7 +7510,7 @@ var ProfileModal = ({
7247
7510
  setDraftAvatarPreview
7248
7511
  ]
7249
7512
  );
7250
- const handleDraftAvatarChange = (0, import_react17.useCallback)(
7513
+ const handleDraftAvatarChange = (0, import_react18.useCallback)(
7251
7514
  (file, preview) => {
7252
7515
  const ACCEPTED_AVATAR_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
7253
7516
  if (file && !ACCEPTED_AVATAR_TYPES.includes(file.type)) {
@@ -7262,7 +7525,7 @@ var ProfileModal = ({
7262
7525
  );
7263
7526
  const originalUsername = (_b = username != null ? username : user == null ? void 0 : user.username) != null ? _b : "";
7264
7527
  const hasChanges = draftUsername !== originalUsername || draftAvatarFile !== void 0;
7265
- const handleSave = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7528
+ const handleSave = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7266
7529
  var _a2, _b2;
7267
7530
  setIsSaving(true);
7268
7531
  try {
@@ -7307,7 +7570,7 @@ var ProfileModal = ({
7307
7570
  onSave,
7308
7571
  originalUsername
7309
7572
  ]);
7310
- const handleCancel = (0, import_react17.useCallback)(() => {
7573
+ const handleCancel = (0, import_react18.useCallback)(() => {
7311
7574
  handleOpenChange(false);
7312
7575
  }, [handleOpenChange]);
7313
7576
  const isAccountConnected = (providers) => {
@@ -7351,7 +7614,7 @@ var ProfileModal = ({
7351
7614
  if (typeof window === "undefined") return;
7352
7615
  ((_a2 = window.top) != null ? _a2 : window).location.assign(url);
7353
7616
  };
7354
- const handleConnectTwitter = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7617
+ const handleConnectTwitter = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7355
7618
  const result = yield startAuth({
7356
7619
  provider: "twitter",
7357
7620
  redirectUrl: resolveRedirectUrl()
@@ -7361,7 +7624,7 @@ var ProfileModal = ({
7361
7624
  navigateTopWindow(result.url);
7362
7625
  }
7363
7626
  }), [onConnectTwitter, startAuth]);
7364
- const handleConnectGoogle = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7627
+ const handleConnectGoogle = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7365
7628
  const result = yield startAuth({
7366
7629
  provider: "google",
7367
7630
  redirectUrl: resolveRedirectUrl()
@@ -7371,7 +7634,7 @@ var ProfileModal = ({
7371
7634
  navigateTopWindow(result.url);
7372
7635
  }
7373
7636
  }), [onConnectGoogle, startAuth]);
7374
- const handleConnectApple = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7637
+ const handleConnectApple = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7375
7638
  const result = yield startAuth({
7376
7639
  provider: "apple",
7377
7640
  redirectUrl: resolveRedirectUrl()
@@ -7381,22 +7644,22 @@ var ProfileModal = ({
7381
7644
  navigateTopWindow(result.url);
7382
7645
  }
7383
7646
  }), [onConnectApple, startAuth]);
7384
- const handleDisconnectTwitter = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7647
+ const handleDisconnectTwitter = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7385
7648
  yield client.disconnectAccount("twitter");
7386
7649
  yield client.getCurrentUser();
7387
7650
  onDisconnectTwitter == null ? void 0 : onDisconnectTwitter();
7388
7651
  }), [client, onDisconnectTwitter]);
7389
- const handleDisconnectGoogle = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7652
+ const handleDisconnectGoogle = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7390
7653
  yield client.disconnectAccount("google");
7391
7654
  yield client.getCurrentUser();
7392
7655
  onDisconnectGoogle == null ? void 0 : onDisconnectGoogle();
7393
7656
  }), [client, onDisconnectGoogle]);
7394
- const handleDisconnectApple = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7657
+ const handleDisconnectApple = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7395
7658
  yield client.disconnectAccount("apple");
7396
7659
  yield client.getCurrentUser();
7397
7660
  onDisconnectApple == null ? void 0 : onDisconnectApple();
7398
7661
  }), [client, onDisconnectApple]);
7399
- const handleConnectEmail = (0, import_react17.useCallback)(() => __async(null, null, function* () {
7662
+ const handleConnectEmail = (0, import_react18.useCallback)(() => __async(null, null, function* () {
7400
7663
  var _a2;
7401
7664
  const typedEmail = typeof window !== "undefined" ? (_a2 = window.prompt("Enter your email to receive a magic link")) == null ? void 0 : _a2.trim() : void 0;
7402
7665
  if (!typedEmail) return;
@@ -7407,7 +7670,7 @@ var ProfileModal = ({
7407
7670
  });
7408
7671
  onConnectEmail == null ? void 0 : onConnectEmail();
7409
7672
  }), [onConnectEmail, startAuth]);
7410
- const handleDisconnectWallet = (0, import_react17.useCallback)(
7673
+ const handleDisconnectWallet = (0, import_react18.useCallback)(
7411
7674
  (wallet) => __async(null, null, function* () {
7412
7675
  const normalizedChain = wallet.chain.toLowerCase();
7413
7676
  const provider = normalizedChain === "solana" || normalizedChain === "svm" ? "solana_wallet" : "wallet";
@@ -7417,7 +7680,7 @@ var ProfileModal = ({
7417
7680
  }),
7418
7681
  [client, onDisconnectWallet]
7419
7682
  );
7420
- const providerActionMap = (0, import_react17.useMemo)(
7683
+ const providerActionMap = (0, import_react18.useMemo)(
7421
7684
  () => ({
7422
7685
  twitter: {
7423
7686
  connect: () => {
@@ -7463,7 +7726,7 @@ var ProfileModal = ({
7463
7726
  if (address.length <= 12) return address;
7464
7727
  return `${address.slice(0, 6)}...${address.slice(-4)}`;
7465
7728
  };
7466
- const resolvedWallets = (0, import_react17.useMemo)(() => {
7729
+ const resolvedWallets = (0, import_react18.useMemo)(() => {
7467
7730
  var _a2, _b2;
7468
7731
  if (wallets) return wallets;
7469
7732
  return (_b2 = (_a2 = user == null ? void 0 : user.wallets) == null ? void 0 : _a2.map((wallet) => ({
@@ -7472,7 +7735,7 @@ var ProfileModal = ({
7472
7735
  displayAddress: shortenAddress(wallet.address)
7473
7736
  }))) != null ? _b2 : [];
7474
7737
  }, [user == null ? void 0 : user.wallets, wallets]);
7475
- const resolvedExchanges = (0, import_react17.useMemo)(() => {
7738
+ const resolvedExchanges = (0, import_react18.useMemo)(() => {
7476
7739
  var _a2, _b2;
7477
7740
  if (exchanges !== void 0) return exchanges;
7478
7741
  const walletAccount = (_a2 = user == null ? void 0 : user.accounts) == null ? void 0 : _a2.find(
@@ -7483,7 +7746,7 @@ var ProfileModal = ({
7483
7746
  const displayAddress = (_b2 = shortenAddress(addr)) != null ? _b2 : addr;
7484
7747
  return EVM_WALLET_VENUES.map((venue) => ({ venue, displayAddress, verified: false }));
7485
7748
  }, [exchanges, user == null ? void 0 : user.accounts]);
7486
- const handleDisconnectExchange = (0, import_react17.useCallback)(
7749
+ const handleDisconnectExchange = (0, import_react18.useCallback)(
7487
7750
  (venue) => __async(null, null, function* () {
7488
7751
  if (exchanges !== void 0) {
7489
7752
  onDisconnectExchangeProp == null ? void 0 : onDisconnectExchangeProp(venue);
@@ -7639,8 +7902,8 @@ var ProfileModal = ({
7639
7902
  ProfileModal.displayName = "ProfileModal";
7640
7903
 
7641
7904
  // src/geo-block-modal/index.tsx
7642
- var import_hooks39 = require("@agg-build/hooks");
7643
- var import_react18 = require("react");
7905
+ var import_hooks38 = require("@agg-build/hooks");
7906
+ var import_react19 = require("react");
7644
7907
  var import_jsx_runtime114 = require("react/jsx-runtime");
7645
7908
  var GeoBlockModal = ({
7646
7909
  open,
@@ -7648,8 +7911,8 @@ var GeoBlockModal = ({
7648
7911
  onConfirm,
7649
7912
  classNames
7650
7913
  }) => {
7651
- const labels = (0, import_hooks39.useLabels)();
7652
- const handleConfirm = (0, import_react18.useCallback)(() => {
7914
+ const labels = (0, import_hooks38.useLabels)();
7915
+ const handleConfirm = (0, import_react19.useCallback)(() => {
7653
7916
  onConfirm == null ? void 0 : onConfirm();
7654
7917
  onOpenChange(false);
7655
7918
  }, [onConfirm, onOpenChange]);
@@ -7698,14 +7961,14 @@ var GeoBlockModal = ({
7698
7961
  GeoBlockModal.displayName = "GeoBlockModal";
7699
7962
 
7700
7963
  // src/geo-block-banner/index.tsx
7701
- var import_hooks40 = require("@agg-build/hooks");
7964
+ var import_hooks39 = require("@agg-build/hooks");
7702
7965
  var import_jsx_runtime115 = require("react/jsx-runtime");
7703
7966
  var GeoBlockBanner = ({
7704
7967
  venue,
7705
- termsUrl = "#",
7968
+ termsUrl = AGG_TERMS_OF_SERVICE_URL,
7706
7969
  className
7707
7970
  }) => {
7708
- const labels = (0, import_hooks40.useLabels)();
7971
+ const labels = (0, import_hooks39.useLabels)();
7709
7972
  const message = venue ? labels.trading.geoBlockVenueMessage(venue) : labels.trading.geoBlockGenericMessage;
7710
7973
  return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
7711
7974
  "div",