coinley-pay 0.59.0 → 0.61.0

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.
@@ -3,15 +3,15 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
5
5
  import { useState, useRef, useEffect, useCallback, useMemo } from "react";
6
+ import ReactDOM, { createPortal } from "react-dom";
6
7
  import { useConnect, useAccount, useSwitchChain, useSendTransaction, useWaitForTransactionReceipt, WagmiProvider, useDisconnect } from "wagmi";
7
8
  import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
8
- import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-D-3pkxRv.js";
9
+ import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-Dssajde4.js";
9
10
  import { createConfig, fallback, http, getAccount as getAccount$1, getWalletClient, simulateContract, writeContract, readContract, waitForTransactionReceipt, estimateFeesPerGas as estimateFeesPerGas$1 } from "@wagmi/core";
10
11
  import { injected, metaMask, coinbaseWallet, walletConnect } from "@wagmi/connectors";
11
12
  import { defineChain as defineChain$1, erc20Abi, http as http$1, createPublicClient, fallback as fallback$1 } from "viem";
12
13
  import { d as defineFormatter, e as bytesToHex, n as numberToHex, f as maxUint16, g as defineTransactionReceipt, h as defineTransaction, i as defineBlock, t as toHex, j as hexToBytes, k as hexToBigInt, l as hexToNumber$1, q as formatLog, r as formatUnits, s as etherUnits, B as BaseError, I as InvalidChainIdError, u as isAddress, v as InvalidAddressError, w as serializeTransaction$2, x as concatHex, y as toRlp, z as toBytes, A as sha256, C as pad, D as defineChain, E as chainConfig$3, F as trim, G as formatTransaction, H as serializeTransaction$3, J as serializeAccessList, K as toYParitySignatureArray, L as FeeCapTooHighError, T as TipAboveFeeCapError, M as maxUint256, N as contracts, O as prettyPrint, P as formatGwei, Q as ExecutionRevertedError, R as FeeCapTooLowError, S as NonceTooHighError, U as NonceTooLowError, V as NonceMaxValueError, W as InsufficientFundsError, X as IntrinsicGasTooHighError, Y as IntrinsicGasTooLowError, Z as TransactionTypeNotSupportedError, _ as UnknownNodeError, $ as Hash, a0 as ahash, a1 as toBytes$1, a2 as clean, a3 as aexists, a4 as abytes, m as mainnet, o as optimism, c as bsc, p as polygon, b as arbitrum, a as avalanche, a5 as hexToBytes$1, a6 as bytesToHex$1, a7 as isBytes, a8 as concatBytes, a9 as anumber, aa as randomBytes, ab as sha512, ac as sha256$1, ad as sha256$2 } from "./polygon-Cno8Hbo5.js";
13
14
  import { useAppKitAccount } from "@reown/appkit/react";
14
- import ReactDOM from "react-dom";
15
15
  import QRCode from "qrcode";
16
16
  const rpcTransactionType = {
17
17
  legacy: "0x0",
@@ -21126,7 +21126,7 @@ const WalletSelector = ({
21126
21126
  try {
21127
21127
  setAppKitError(null);
21128
21128
  setWalletConnectAddress(solanaAccountState.address);
21129
- const { createWalletConnectAdapter } = await import("./appKitSolana-DDxtvGo0.js");
21129
+ const { createWalletConnectAdapter } = await import("./appKitSolana-C_InTqyc.js");
21130
21130
  const adapter = createWalletConnectAdapter(solanaAccountState.address);
21131
21131
  await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
21132
21132
  console.log("✅ WalletConnect synced with SDK");
@@ -21231,7 +21231,7 @@ const WalletSelector = ({
21231
21231
  setAppKitLoading(true);
21232
21232
  setAppKitError(null);
21233
21233
  try {
21234
- const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-CdtwtZ3M.js");
21234
+ const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-BzMDYdux.js");
21235
21235
  await initializeAppKitEVM(wagmiConfig);
21236
21236
  await openAppKitModal();
21237
21237
  } catch (error) {
@@ -21251,7 +21251,7 @@ const WalletSelector = ({
21251
21251
  setAppKitError(null);
21252
21252
  try {
21253
21253
  console.log("📦 Loading AppKit Solana module...");
21254
- const { initializeAppKitSolana } = await import("./appKitSolana-DDxtvGo0.js");
21254
+ const { initializeAppKitSolana } = await import("./appKitSolana-C_InTqyc.js");
21255
21255
  console.log("✅ Module loaded, initializing...");
21256
21256
  const modal = await initializeAppKitSolana(solanaWallet);
21257
21257
  console.log("✅ AppKit Solana initialized successfully");
@@ -23165,6 +23165,7 @@ const CC_CHAIN_NAMES = {
23165
23165
  };
23166
23166
  const ccChainName = (id) => CC_CHAIN_NAMES[Number(id)] || `Chain ${id}`;
23167
23167
  const ccChainIcon = (id) => `https://assets.relay.link/icons/${Number(id)}/light.png`;
23168
+ const renderInPortal = (content) => typeof document !== "undefined" && document.body ? createPortal(content, document.body) : content;
23168
23169
  const CoinleyPaymentInternal = ({
23169
23170
  publicKey: publicKey2,
23170
23171
  apiKey,
@@ -23334,6 +23335,7 @@ const CoinleyPaymentInternal = ({
23334
23335
  const [depositQrCode, setDepositQrCode] = useState("");
23335
23336
  const [preferredWallet, setPreferredWallet] = useState("metamask");
23336
23337
  const [qrWalletChoiceConfirmed, setQrWalletChoiceConfirmed] = useState(false);
23338
+ const [qrSelectedWalletId, setQrSelectedWalletId] = useState(null);
23337
23339
  const [selectedWalletOptionId, setSelectedWalletOptionId] = useState("");
23338
23340
  const [isMobile, setIsMobile] = useState(false);
23339
23341
  const [mobilePaymentStarted, setMobilePaymentStarted] = useState(() => {
@@ -25220,8 +25222,10 @@ const CoinleyPaymentInternal = ({
25220
25222
  resetWalletTokens();
25221
25223
  setPaymentData(null);
25222
25224
  setError("");
25225
+ setCcError(null);
25223
25226
  setQrCodeDataUrl("");
25224
25227
  setQrWalletChoiceConfirmed(false);
25228
+ setQrSelectedWalletId(null);
25225
25229
  setCcResult(null);
25226
25230
  setCcQrCode("");
25227
25231
  setCcPhase("idle");
@@ -25247,8 +25251,10 @@ const CoinleyPaymentInternal = ({
25247
25251
  (_a2 = transactionHandling.resetTransaction) == null ? void 0 : _a2.call(transactionHandling);
25248
25252
  setPaymentData(null);
25249
25253
  setError("");
25254
+ setCcError(null);
25250
25255
  setQrCodeDataUrl("");
25251
25256
  setQrWalletChoiceConfirmed(false);
25257
+ setQrSelectedWalletId(null);
25252
25258
  setSelectedToken(token);
25253
25259
  setCcOriginToken((selectedNetwork == null ? void 0 : selectedNetwork.isCrossChainSource) ? token : null);
25254
25260
  createNewAttempt("token-selected", {
@@ -26379,6 +26385,12 @@ const CoinleyPaymentInternal = ({
26379
26385
  setRefundRequestMessage("");
26380
26386
  setManualCheckStatus(null);
26381
26387
  clearUnderpaymentRecovery(activeTransferPaymentId);
26388
+ holdRecoveryLoading("refund", ccResult ? getCrossChainRefundPendingStatus({
26389
+ refundStatus: "pending",
26390
+ refundRecipient: trimmedAddress,
26391
+ underpayment: underpaymentInfo,
26392
+ relay: { originChainId: ccResult.originChainId || ccOriginChainId }
26393
+ }) : getRefundPendingStatus());
26382
26394
  const refundPayload = {
26383
26395
  paymentId: activeTransferPaymentId,
26384
26396
  refundAddress: trimmedAddress,
@@ -26527,235 +26539,243 @@ const CoinleyPaymentInternal = ({
26527
26539
  };
26528
26540
  if (!isOpen) return null;
26529
26541
  if (currentStep === PAYMENT_STEPS.PROCESSING) {
26530
- return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26531
- /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
26532
- /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-5 pt-7 shadow-2xl animate-slide-up-sheet" : "relative flex h-[500px] w-[430px] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-5 pt-7 shadow-2xl", children: [
26533
- /* @__PURE__ */ jsx(
26534
- "button",
26535
- {
26536
- onClick: handleCancel,
26537
- className: "absolute right-4 top-5 flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
26538
- "aria-label": "Close payment modal",
26539
- children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
26540
- }
26541
- ),
26542
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center justify-center pt-8 text-center", children: [
26543
- /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className: "mb-5 h-24 w-36 object-contain" }),
26544
- /* @__PURE__ */ jsx("h3", { className: "mb-2 text-2xl font-semibold text-black", children: "Please wait..." }),
26545
- /* @__PURE__ */ jsxs("p", { className: "mx-auto mb-7 max-w-[370px] text-base leading-6 text-[#9EA0A8]", children: [
26546
- "Your transaction ",
26547
- /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26548
- "$",
26549
- formatAmount(paymentAmount || (config == null ? void 0 : config.amount) || 0)
26550
- ] }),
26551
- " has been sent to the blockchain and is being processed..."
26552
- ] }),
26553
- /* @__PURE__ */ jsxs("div", { className: "mb-16 w-full", children: [
26554
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[40px_1fr_40px] items-center gap-4", children: [
26555
- /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[#07923B] text-white", children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) }) }),
26556
- /* @__PURE__ */ jsx("div", { className: "border-t border-dashed border-[#DFE1E7]" }),
26557
- /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full border border-[#EEF0F4] bg-white", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "", className: "h-6 w-6 object-contain" }) })
26558
- ] }),
26559
- /* @__PURE__ */ jsxs("div", { className: "mt-2 grid grid-cols-[1fr_1fr] text-xs", children: [
26560
- /* @__PURE__ */ jsx("p", { className: "text-left text-[#9EA0A8]", children: "Transaction submitted" }),
26561
- /* @__PURE__ */ jsx("p", { className: "text-right font-semibold text-black", children: "confirming payment..." })
26562
- ] })
26563
- ] })
26564
- ] }),
26565
- /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[#F2E8C8] bg-[#FFF9E8] px-3 py-2 text-center text-xs font-medium text-[#B54D0A]", children: "Please don't close this window. This usually takes 10 - 30 seconds" }),
26566
- /* @__PURE__ */ jsx("p", { className: "mt-4 text-center text-xs text-[#A9ABB2]", children: "Powered by Stablezact" })
26567
- ] }) })
26568
- ] });
26569
- }
26570
- if (currentStep === PAYMENT_STEPS.SUCCESS) {
26571
- if (offsetSuccessDetails) {
26572
- return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26573
- /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26574
- /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-4 pt-8 animate-slide-up-sheet" : "relative flex h-auto min-h-[554px] w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-4 pt-8", children: [
26542
+ return renderInPortal(
26543
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26544
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
26545
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-5 pt-7 shadow-2xl animate-slide-up-sheet" : "relative flex h-[500px] w-[430px] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-5 pt-7 shadow-2xl", children: [
26575
26546
  /* @__PURE__ */ jsx(
26576
26547
  "button",
26577
26548
  {
26578
- type: "button",
26579
- onClick: onClose,
26549
+ onClick: handleCancel,
26580
26550
  className: "absolute right-4 top-5 flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
26581
26551
  "aria-label": "Close payment modal",
26582
26552
  children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
26583
26553
  }
26584
26554
  ),
26585
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-[68px]", children: [
26586
- /* @__PURE__ */ jsxs("div", { className: "mb-9 text-center", children: [
26587
- /* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-full bg-[#D9F8E6]", children: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-[#08C65A] text-white", children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) }) }) }),
26588
- /* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-medium text-black", children: "Offset Successful" }),
26589
- /* @__PURE__ */ jsxs("p", { className: "text-base text-[#A9ABB2]", children: [
26590
- /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26591
- "$",
26592
- formatAmount(offsetSuccessDetails.amount || 0)
26593
- ] }),
26594
- " ",
26595
- "sent to ",
26596
- offsetSuccessDetails.merchantName
26597
- ] })
26598
- ] }),
26599
- /* @__PURE__ */ jsxs("div", { className: "mb-9 space-y-0", children: [
26600
- /* @__PURE__ */ jsxs("div", { children: [
26601
- /* @__PURE__ */ jsx("p", { className: "mb-1.5 text-xs text-[#4B5563]", children: "Transaction ID" }),
26602
- /* @__PURE__ */ jsxs("div", { className: "flex h-11 items-center justify-between rounded-lg border border-[#EEF0F4] bg-[#FAFAFB] px-3", children: [
26603
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-black", children: truncateTransactionId(offsetSuccessDetails.transactionHash) }),
26604
- /* @__PURE__ */ jsx(
26605
- "button",
26606
- {
26607
- type: "button",
26608
- onClick: () => copyToClipboard(offsetSuccessDetails.transactionHash, "offsetSuccessTx"),
26609
- className: "ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#111827] transition-colors hover:bg-gray-100",
26610
- "aria-label": "Copy transaction ID",
26611
- children: copiedField === "offsetSuccessTx" ? /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-[#08C65A]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.2, d: "M5 13l4 4L19 7" }) }) : /* @__PURE__ */ jsxs("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
26612
- /* @__PURE__ */ jsx("rect", { x: "8", y: "7", width: "10", height: "13", rx: "2", strokeWidth: "1.7" }),
26613
- /* @__PURE__ */ jsx("path", { d: "M6 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v1", strokeWidth: "1.7", strokeLinecap: "round" })
26614
- ] })
26615
- }
26616
- )
26617
- ] })
26618
- ] }),
26619
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26620
- /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Network" }),
26621
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.networkName })
26622
- ] }),
26623
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-3", children: [
26624
- /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Token" }),
26625
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.tokenSymbol })
26555
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center justify-center pt-8 text-center", children: [
26556
+ /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className: "mb-5 h-24 w-36 object-contain" }),
26557
+ /* @__PURE__ */ jsx("h3", { className: "mb-2 text-2xl font-semibold text-black", children: "Please wait..." }),
26558
+ /* @__PURE__ */ jsxs("p", { className: "mx-auto mb-7 max-w-[370px] text-base leading-6 text-[#9EA0A8]", children: [
26559
+ "Your transaction ",
26560
+ /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26561
+ "$",
26562
+ formatAmount(paymentAmount || (config == null ? void 0 : config.amount) || 0)
26626
26563
  ] }),
26627
- offsetSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
26628
- "a",
26629
- {
26630
- href: offsetSuccessDetails.explorerUrl,
26631
- target: "_blank",
26632
- rel: "noopener noreferrer",
26633
- className: "mt-1 flex h-11 w-full items-center justify-center gap-2 rounded-lg border border-[#BFA7FF] text-sm font-medium text-[#7042D2] transition-colors hover:bg-[#F7F2FF]",
26634
- children: [
26635
- "View on ",
26636
- offsetSuccessDetails.explorerName,
26637
- /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, d: "M7 17L17 7M10 7h7v7" }) })
26638
- ]
26639
- }
26640
- )
26564
+ " has been sent to the blockchain and is being processed..."
26641
26565
  ] }),
26566
+ /* @__PURE__ */ jsxs("div", { className: "mb-16 w-full", children: [
26567
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[40px_1fr_40px] items-center gap-4", children: [
26568
+ /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[#07923B] text-white", children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) }) }),
26569
+ /* @__PURE__ */ jsx("div", { className: "border-t border-dashed border-[#DFE1E7]" }),
26570
+ /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full border border-[#EEF0F4] bg-white", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "", className: "h-6 w-6 object-contain" }) })
26571
+ ] }),
26572
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 grid grid-cols-[1fr_1fr] text-xs", children: [
26573
+ /* @__PURE__ */ jsx("p", { className: "text-left text-[#9EA0A8]", children: "Transaction submitted" }),
26574
+ /* @__PURE__ */ jsx("p", { className: "text-right font-semibold text-black", children: "confirming payment..." })
26575
+ ] })
26576
+ ] })
26577
+ ] }),
26578
+ /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[#F2E8C8] bg-[#FFF9E8] px-3 py-2 text-center text-xs font-medium text-[#B54D0A]", children: "Please don't close this window. This usually takes 10 - 30 seconds" }),
26579
+ /* @__PURE__ */ jsx("p", { className: "mt-4 text-center text-xs text-[#A9ABB2]", children: "Powered by Stablezact" })
26580
+ ] }) })
26581
+ ] })
26582
+ );
26583
+ }
26584
+ if (currentStep === PAYMENT_STEPS.SUCCESS) {
26585
+ if (offsetSuccessDetails) {
26586
+ return renderInPortal(
26587
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26588
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26589
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-4 pt-8 animate-slide-up-sheet" : "relative flex h-auto min-h-[554px] w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-4 pt-8", children: [
26642
26590
  /* @__PURE__ */ jsx(
26643
26591
  "button",
26644
26592
  {
26645
26593
  type: "button",
26646
26594
  onClick: onClose,
26647
- className: "mt-auto h-12 w-full rounded-lg bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
26648
- children: "Close"
26595
+ className: "absolute right-4 top-5 flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
26596
+ "aria-label": "Close payment modal",
26597
+ children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
26649
26598
  }
26650
- )
26651
- ] })
26652
- ] }) })
26653
- ] });
26654
- }
26655
- if (refundSuccessDetails) {
26656
- return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26657
- /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26658
- /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-4 pt-8 animate-slide-up-sheet" : "relative flex h-auto min-h-[554px] w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-4 pt-8", children: [
26659
- /* @__PURE__ */ jsx(
26660
- "button",
26661
- {
26662
- type: "button",
26663
- onClick: onClose,
26664
- className: "absolute right-4 top-5 flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
26665
- "aria-label": "Close payment modal",
26666
- children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
26667
- }
26668
- ),
26669
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-[68px]", children: [
26670
- /* @__PURE__ */ jsxs("div", { className: "mb-9 text-center", children: [
26671
- /* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-full bg-[#D9F8E6]", children: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-[#08C65A] text-white", children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) }) }) }),
26672
- /* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-medium text-black", children: "Refund Successful" }),
26673
- /* @__PURE__ */ jsxs("p", { className: "text-base text-[#A9ABB2]", children: [
26674
- /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26675
- "$",
26676
- formatAmount(refundSuccessDetails.amount || 0)
26677
- ] }),
26678
- " ",
26679
- "refunded to your wallet"
26680
- ] })
26681
- ] }),
26682
- /* @__PURE__ */ jsxs("div", { className: "mb-9 space-y-0", children: [
26683
- refundSuccessDetails.transactionHash && /* @__PURE__ */ jsxs("div", { children: [
26684
- /* @__PURE__ */ jsx("p", { className: "mb-1.5 text-xs text-[#4B5563]", children: "Transaction ID" }),
26685
- /* @__PURE__ */ jsxs("div", { className: "flex h-11 items-center justify-between rounded-lg border border-[#EEF0F4] bg-[#FAFAFB] px-3", children: [
26686
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-black", children: truncateTransactionId(refundSuccessDetails.transactionHash) }),
26687
- /* @__PURE__ */ jsx(
26688
- "button",
26689
- {
26690
- type: "button",
26691
- onClick: () => copyToClipboard(refundSuccessDetails.transactionHash, "refundSuccessTx"),
26692
- className: "ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#111827] transition-colors hover:bg-gray-100",
26693
- "aria-label": "Copy transaction ID",
26694
- children: copiedField === "refundSuccessTx" ? /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-[#08C65A]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.2, d: "M5 13l4 4L19 7" }) }) : /* @__PURE__ */ jsxs("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
26695
- /* @__PURE__ */ jsx("rect", { x: "8", y: "7", width: "10", height: "13", rx: "2", strokeWidth: "1.7" }),
26696
- /* @__PURE__ */ jsx("path", { d: "M6 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v1", strokeWidth: "1.7", strokeLinecap: "round" })
26697
- ] })
26698
- }
26699
- )
26599
+ ),
26600
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-[68px]", children: [
26601
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 text-center", children: [
26602
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-full bg-[#D9F8E6]", children: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-[#08C65A] text-white", children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) }) }) }),
26603
+ /* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-medium text-black", children: "Offset Successful" }),
26604
+ /* @__PURE__ */ jsxs("p", { className: "text-base text-[#A9ABB2]", children: [
26605
+ /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26606
+ "$",
26607
+ formatAmount(offsetSuccessDetails.amount || 0)
26608
+ ] }),
26609
+ " ",
26610
+ "sent to ",
26611
+ offsetSuccessDetails.merchantName
26700
26612
  ] })
26701
26613
  ] }),
26702
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26703
- /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Network" }),
26704
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: refundSuccessDetails.networkName })
26705
- ] }),
26706
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26707
- /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Token" }),
26708
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: refundSuccessDetails.tokenSymbol })
26709
- ] }),
26710
- refundSuccessDetails.recipientAddress && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-3", children: [
26711
- /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Wallet" }),
26712
- /* @__PURE__ */ jsx("span", { className: "max-w-[220px] truncate text-sm font-medium text-black", children: truncateAddress(refundSuccessDetails.recipientAddress) })
26614
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 space-y-0", children: [
26615
+ /* @__PURE__ */ jsxs("div", { children: [
26616
+ /* @__PURE__ */ jsx("p", { className: "mb-1.5 text-xs text-[#4B5563]", children: "Transaction ID" }),
26617
+ /* @__PURE__ */ jsxs("div", { className: "flex h-11 items-center justify-between rounded-lg border border-[#EEF0F4] bg-[#FAFAFB] px-3", children: [
26618
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-black", children: truncateTransactionId(offsetSuccessDetails.transactionHash) }),
26619
+ /* @__PURE__ */ jsx(
26620
+ "button",
26621
+ {
26622
+ type: "button",
26623
+ onClick: () => copyToClipboard(offsetSuccessDetails.transactionHash, "offsetSuccessTx"),
26624
+ className: "ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#111827] transition-colors hover:bg-gray-100",
26625
+ "aria-label": "Copy transaction ID",
26626
+ children: copiedField === "offsetSuccessTx" ? /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-[#08C65A]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.2, d: "M5 13l4 4L19 7" }) }) : /* @__PURE__ */ jsxs("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
26627
+ /* @__PURE__ */ jsx("rect", { x: "8", y: "7", width: "10", height: "13", rx: "2", strokeWidth: "1.7" }),
26628
+ /* @__PURE__ */ jsx("path", { d: "M6 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v1", strokeWidth: "1.7", strokeLinecap: "round" })
26629
+ ] })
26630
+ }
26631
+ )
26632
+ ] })
26633
+ ] }),
26634
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26635
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Network" }),
26636
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.networkName })
26637
+ ] }),
26638
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-3", children: [
26639
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Token" }),
26640
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.tokenSymbol })
26641
+ ] }),
26642
+ offsetSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
26643
+ "a",
26644
+ {
26645
+ href: offsetSuccessDetails.explorerUrl,
26646
+ target: "_blank",
26647
+ rel: "noopener noreferrer",
26648
+ className: "mt-1 flex h-11 w-full items-center justify-center gap-2 rounded-lg border border-[#BFA7FF] text-sm font-medium text-[#7042D2] transition-colors hover:bg-[#F7F2FF]",
26649
+ children: [
26650
+ "View on ",
26651
+ offsetSuccessDetails.explorerName,
26652
+ /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, d: "M7 17L17 7M10 7h7v7" }) })
26653
+ ]
26654
+ }
26655
+ )
26713
26656
  ] }),
26714
- refundSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
26715
- "a",
26657
+ /* @__PURE__ */ jsx(
26658
+ "button",
26716
26659
  {
26717
- href: refundSuccessDetails.explorerUrl,
26718
- target: "_blank",
26719
- rel: "noopener noreferrer",
26720
- className: "mt-1 flex h-11 w-full items-center justify-center gap-2 rounded-lg border border-[#BFA7FF] text-sm font-medium text-[#7042D2] transition-colors hover:bg-[#F7F2FF]",
26721
- children: [
26722
- "View on ",
26723
- refundSuccessDetails.explorerName,
26724
- /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, d: "M7 17L17 7M10 7h7v7" }) })
26725
- ]
26660
+ type: "button",
26661
+ onClick: onClose,
26662
+ className: "mt-auto h-12 w-full rounded-lg bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
26663
+ children: "Close"
26726
26664
  }
26727
26665
  )
26728
- ] }),
26666
+ ] })
26667
+ ] }) })
26668
+ ] })
26669
+ );
26670
+ }
26671
+ if (refundSuccessDetails) {
26672
+ return renderInPortal(
26673
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26674
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26675
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-4 pt-8 animate-slide-up-sheet" : "relative flex h-auto min-h-[554px] w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-4 pt-8", children: [
26729
26676
  /* @__PURE__ */ jsx(
26730
26677
  "button",
26731
26678
  {
26732
26679
  type: "button",
26733
26680
  onClick: onClose,
26734
- className: "mt-auto h-12 w-full rounded-lg bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
26735
- children: "Close"
26681
+ className: "absolute right-4 top-5 flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
26682
+ "aria-label": "Close payment modal",
26683
+ children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
26736
26684
  }
26737
- )
26738
- ] })
26739
- ] }) })
26740
- ] });
26685
+ ),
26686
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-[68px]", children: [
26687
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 text-center", children: [
26688
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-full bg-[#D9F8E6]", children: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-[#08C65A] text-white", children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) }) }) }),
26689
+ /* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-medium text-black", children: "Refund Successful" }),
26690
+ /* @__PURE__ */ jsxs("p", { className: "text-base text-[#A9ABB2]", children: [
26691
+ /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26692
+ "$",
26693
+ formatAmount(refundSuccessDetails.amount || 0)
26694
+ ] }),
26695
+ " ",
26696
+ "refunded to your wallet"
26697
+ ] })
26698
+ ] }),
26699
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 space-y-0", children: [
26700
+ refundSuccessDetails.transactionHash && /* @__PURE__ */ jsxs("div", { children: [
26701
+ /* @__PURE__ */ jsx("p", { className: "mb-1.5 text-xs text-[#4B5563]", children: "Transaction ID" }),
26702
+ /* @__PURE__ */ jsxs("div", { className: "flex h-11 items-center justify-between rounded-lg border border-[#EEF0F4] bg-[#FAFAFB] px-3", children: [
26703
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-black", children: truncateTransactionId(refundSuccessDetails.transactionHash) }),
26704
+ /* @__PURE__ */ jsx(
26705
+ "button",
26706
+ {
26707
+ type: "button",
26708
+ onClick: () => copyToClipboard(refundSuccessDetails.transactionHash, "refundSuccessTx"),
26709
+ className: "ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#111827] transition-colors hover:bg-gray-100",
26710
+ "aria-label": "Copy transaction ID",
26711
+ children: copiedField === "refundSuccessTx" ? /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-[#08C65A]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.2, d: "M5 13l4 4L19 7" }) }) : /* @__PURE__ */ jsxs("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
26712
+ /* @__PURE__ */ jsx("rect", { x: "8", y: "7", width: "10", height: "13", rx: "2", strokeWidth: "1.7" }),
26713
+ /* @__PURE__ */ jsx("path", { d: "M6 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v1", strokeWidth: "1.7", strokeLinecap: "round" })
26714
+ ] })
26715
+ }
26716
+ )
26717
+ ] })
26718
+ ] }),
26719
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26720
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Network" }),
26721
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: refundSuccessDetails.networkName })
26722
+ ] }),
26723
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26724
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Token" }),
26725
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: refundSuccessDetails.tokenSymbol })
26726
+ ] }),
26727
+ refundSuccessDetails.recipientAddress && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-3", children: [
26728
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Wallet" }),
26729
+ /* @__PURE__ */ jsx("span", { className: "max-w-[220px] truncate text-sm font-medium text-black", children: truncateAddress(refundSuccessDetails.recipientAddress) })
26730
+ ] }),
26731
+ refundSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
26732
+ "a",
26733
+ {
26734
+ href: refundSuccessDetails.explorerUrl,
26735
+ target: "_blank",
26736
+ rel: "noopener noreferrer",
26737
+ className: "mt-1 flex h-11 w-full items-center justify-center gap-2 rounded-lg border border-[#BFA7FF] text-sm font-medium text-[#7042D2] transition-colors hover:bg-[#F7F2FF]",
26738
+ children: [
26739
+ "View on ",
26740
+ refundSuccessDetails.explorerName,
26741
+ /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.8, d: "M7 17L17 7M10 7h7v7" }) })
26742
+ ]
26743
+ }
26744
+ )
26745
+ ] }),
26746
+ /* @__PURE__ */ jsx(
26747
+ "button",
26748
+ {
26749
+ type: "button",
26750
+ onClick: onClose,
26751
+ className: "mt-auto h-12 w-full rounded-lg bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
26752
+ children: "Close"
26753
+ }
26754
+ )
26755
+ ] })
26756
+ ] }) })
26757
+ ] })
26758
+ );
26741
26759
  }
26742
- return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26743
- /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26744
- /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsx("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-5 pt-5 animate-slide-up-sheet" : "relative flex h-[640px] max-h-[calc(100vh-32px)] min-h-0 w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-5 pt-5", children: /* @__PURE__ */ jsx(
26745
- PaymentStatus,
26746
- {
26747
- status: "success",
26748
- message: "Payment completed successfully!",
26749
- theme,
26750
- payment: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.payment) || paymentData,
26751
- transactionHash: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.transactionHash) || (isSolana ? solanaTransaction.txSignature || (paymentData == null ? void 0 : paymentData.transactionHash) : currentTransactionHash || (paymentData == null ? void 0 : paymentData.transactionHash)),
26752
- selectedPaymentMethod: selectedToken,
26753
- selectedNetwork: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.network) || selectedNetwork,
26754
- merchantName: (config == null ? void 0 : config.merchantName) || "Merchant",
26755
- onClose
26756
- }
26757
- ) }) })
26758
- ] });
26760
+ return renderInPortal(
26761
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26762
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26763
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsx("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-5 pt-5 animate-slide-up-sheet" : "relative flex h-[640px] max-h-[calc(100vh-32px)] min-h-0 w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-5 pt-5", children: /* @__PURE__ */ jsx(
26764
+ PaymentStatus,
26765
+ {
26766
+ status: "success",
26767
+ message: "Payment completed successfully!",
26768
+ theme,
26769
+ payment: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.payment) || paymentData,
26770
+ transactionHash: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.transactionHash) || (isSolana ? solanaTransaction.txSignature || (paymentData == null ? void 0 : paymentData.transactionHash) : currentTransactionHash || (paymentData == null ? void 0 : paymentData.transactionHash)),
26771
+ selectedPaymentMethod: selectedToken,
26772
+ selectedNetwork: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.network) || selectedNetwork,
26773
+ merchantName: (config == null ? void 0 : config.merchantName) || "Merchant",
26774
+ onClose
26775
+ }
26776
+ ) }) })
26777
+ ] })
26778
+ );
26759
26779
  }
26760
26780
  const paymentAmountLabel = isConverting ? "..." : `$${formatAmount(paymentAmount || (config == null ? void 0 : config.amount) || 0)}`;
26761
26781
  const underpaymentOffsetAmountLabel = underpaymentInfo ? `${formatAmount(underpaymentInfo.shortfallAmount || 0)} ${underpaymentInfo.tokenSymbol || (selectedToken == null ? void 0 : selectedToken.symbol) || ""}`.trim() : paymentAmountLabel;
@@ -26813,16 +26833,16 @@ const CoinleyPaymentInternal = ({
26813
26833
  const renderMethodTabs = () => /* @__PURE__ */ jsxs("div", { className: isTightWalletView ? "mb-2" : isCompactCheckoutView ? "mb-3" : "mb-4", children: [
26814
26834
  /* @__PURE__ */ jsx("p", { className: `text-xs text-[#9EA0A8] ${isTightWalletView ? "mb-1" : "mb-2"}`, children: "Payment methods" }),
26815
26835
  /* @__PURE__ */ jsx("div", { className: "flex overflow-hidden rounded-xl bg-[#F6F6F7] p-1", children: [
26816
- { tab: PAYMENT_TABS.TRANSFER, label: "Transfer to address" },
26817
- { tab: PAYMENT_TABS.QR, label: "QR Code" },
26818
- { tab: PAYMENT_TABS.WALLET, label: "Wallet Extension" }
26836
+ { tab: PAYMENT_TABS.TRANSFER, label: "Transfer to address", mobileLabel: "Transfer" },
26837
+ { tab: PAYMENT_TABS.QR, label: "QR Code", mobileLabel: "QR Code" },
26838
+ { tab: PAYMENT_TABS.WALLET, label: "Wallet Extension", mobileLabel: "Wallet" }
26819
26839
  ].map((method) => /* @__PURE__ */ jsx(
26820
26840
  "button",
26821
26841
  {
26822
26842
  type: "button",
26823
26843
  onClick: () => isMobile ? handleMobileTabSelect(method.tab) : setActiveTab(method.tab),
26824
- className: `min-w-0 ${isTightWalletView ? "h-7 px-2 text-[13px]" : "h-9 px-2.5 text-sm"} rounded-lg transition-colors whitespace-nowrap ${method.tab === PAYMENT_TABS.TRANSFER ? "flex-[1.35]" : "flex-1"} ${activeTab === method.tab ? "bg-white text-[#5B2EEA] shadow-[0_1px_3px_rgba(31,36,48,0.08)]" : "text-[#535865] hover:text-[#1F2430]"}`,
26825
- children: method.label
26844
+ className: `min-w-0 truncate ${isTightWalletView ? "h-7 px-2 text-[13px]" : "h-9 px-2.5 text-sm"} rounded-lg transition-colors whitespace-nowrap ${method.tab === PAYMENT_TABS.TRANSFER ? "flex-[1.35]" : "flex-1"} ${activeTab === method.tab ? "bg-white text-[#5B2EEA] shadow-[0_1px_3px_rgba(31,36,48,0.08)]" : "text-[#535865] hover:text-[#1F2430]"}`,
26845
+ children: isMobile ? method.mobileLabel : method.label
26826
26846
  },
26827
26847
  method.tab
26828
26848
  )) })
@@ -26961,7 +26981,7 @@ const CoinleyPaymentInternal = ({
26961
26981
  const knownChain = ALCHEMY_EVM_CHAINS.find((chain) => Number(chain.id) === chainId);
26962
26982
  return {
26963
26983
  id: `cross-chain-${chainId}`,
26964
- name: (knownChain == null ? void 0 : knownChain.displayName) || ccChainName(chainId),
26984
+ name: (knownChain == null ? void 0 : knownChain.displayName) || source.name || ccChainName(chainId),
26965
26985
  shortName: (knownChain == null ? void 0 : knownChain.shortName) || `chain-${chainId}`,
26966
26986
  chainId,
26967
26987
  chainType: "evm",
@@ -27103,7 +27123,8 @@ const CoinleyPaymentInternal = ({
27103
27123
  const token = availableTokens.find((item) => item.id === tokenId);
27104
27124
  if (token) handleTokenSelect(token);
27105
27125
  }
27106
- })
27126
+ }),
27127
+ ccError && /* @__PURE__ */ jsx("div", { className: "mt-3 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs font-medium text-red-600", children: ccError })
27107
27128
  ] });
27108
27129
  const renderWalletExtensionSetupPanel = () => /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
27109
27130
  !selectedNetwork && renderWalletNetworkPickerPanel(),
@@ -27118,6 +27139,7 @@ const CoinleyPaymentInternal = ({
27118
27139
  ];
27119
27140
  const handleQrWalletSelect = async (walletId) => {
27120
27141
  setPreferredWallet(walletId);
27142
+ setQrSelectedWalletId(walletId);
27121
27143
  setError(null);
27122
27144
  setQrCodeDataUrl("");
27123
27145
  setQrWalletChoiceConfirmed(false);
@@ -27140,6 +27162,7 @@ const CoinleyPaymentInternal = ({
27140
27162
  await createPaymentAndGenerateQR(network, token, walletId);
27141
27163
  } catch (err) {
27142
27164
  setQrWalletChoiceConfirmed(false);
27165
+ setQrSelectedWalletId(null);
27143
27166
  setError((err == null ? void 0 : err.message) || "Unable to generate QR code. Please try again.");
27144
27167
  }
27145
27168
  };
@@ -27351,9 +27374,9 @@ const CoinleyPaymentInternal = ({
27351
27374
  type: "button",
27352
27375
  onClick: () => handleQrWalletSelect(wallet.id),
27353
27376
  disabled: !selectedNetwork || !selectedToken || qrLoading || isConverting,
27354
- className: `relative flex h-[76px] min-w-0 flex-col items-start justify-between rounded-lg border bg-[#FAFAFB] px-2.5 py-3 text-left transition-colors ${preferredWallet === wallet.id ? "border-[#7042D2] bg-[#FBF8FF]" : "border-[#EEF0F4] hover:border-[#C9B8F6]"} disabled:cursor-not-allowed disabled:opacity-60`,
27377
+ className: `relative flex h-[76px] min-w-0 flex-col items-start justify-between rounded-lg border bg-[#FAFAFB] px-2.5 py-3 text-left transition-colors ${qrSelectedWalletId === wallet.id ? "border-[#7042D2] bg-[#FBF8FF]" : "border-[#EEF0F4] hover:border-[#C9B8F6]"} disabled:cursor-not-allowed disabled:opacity-60`,
27355
27378
  children: [
27356
- preferredWallet === wallet.id && qrWalletChoiceConfirmed && /* @__PURE__ */ jsx("span", { className: "absolute right-[-5px] top-[-6px] flex h-4 w-4 items-center justify-center rounded-full border border-[#7042D2] bg-white text-[#7042D2]", children: /* @__PURE__ */ jsx("svg", { className: "h-2.5 w-2.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) }) }),
27379
+ qrSelectedWalletId === wallet.id && qrWalletChoiceConfirmed && /* @__PURE__ */ jsx("span", { className: "absolute right-[-5px] top-[-6px] flex h-4 w-4 items-center justify-center rounded-full border border-[#7042D2] bg-white text-[#7042D2]", children: /* @__PURE__ */ jsx("svg", { className: "h-2.5 w-2.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) }) }),
27357
27380
  /* @__PURE__ */ jsx(
27358
27381
  "img",
27359
27382
  {
@@ -27374,7 +27397,7 @@ const CoinleyPaymentInternal = ({
27374
27397
  /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "", className: "h-5 w-6 object-contain" }),
27375
27398
  "Generating QR code..."
27376
27399
  ] }),
27377
- /* @__PURE__ */ jsx("p", { className: "text-xs leading-5 text-[#9EA0A8]", children: "Simply select a wallet app to generate the QR code then input the amount, and transfer your funds" })
27400
+ qrWalletChoiceConfirmed ? renderQrPaymentPanel() : !qrLoading && /* @__PURE__ */ jsx("p", { className: "text-xs leading-5 text-[#9EA0A8]", children: "Simply select a wallet app to generate the QR code then input the amount, and transfer your funds" })
27378
27401
  ] });
27379
27402
  const renderQrPaymentPanel = () => /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
27380
27403
  /* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col gap-3 min-[380px]:flex-row min-[380px]:items-start", children: [
@@ -27642,6 +27665,14 @@ const CoinleyPaymentInternal = ({
27642
27665
  disabled: loading || isConverting || walletOptionsForSelectedNetwork.length === 0 || isSwapOrBridgeFlow && (relayBridge.bridgeStatus === "quoting" || (selectedToken == null ? void 0 : selectedToken.routeStatus) === "unsupported")
27643
27666
  });
27644
27667
  }
27668
+ if (activeTab === PAYMENT_TABS.QR && !qrWalletChoiceConfirmed) {
27669
+ return renderFooterPrimaryButton({
27670
+ label: qrLoading ? "Generating QR code..." : "Continue",
27671
+ onClick: () => {
27672
+ },
27673
+ disabled: true
27674
+ });
27675
+ }
27645
27676
  return null;
27646
27677
  };
27647
27678
  const renderCheckoutFooter = () => {
@@ -27932,7 +27963,7 @@ const CoinleyPaymentInternal = ({
27932
27963
  ) }),
27933
27964
  isSwapOrBridgeFlow && (selectedToken == null ? void 0 : selectedToken.routeStatus) === "unsupported" && /* @__PURE__ */ jsx("div", { className: "mb-2 rounded-lg border border-red-200 bg-red-50 p-2 text-xs text-red-700", children: UNSUPPORTED_ROUTE_MESSAGE })
27934
27965
  ] }),
27935
- activeTab === PAYMENT_TABS.QR && /* @__PURE__ */ jsx(Fragment, { children: qrWalletChoiceConfirmed ? renderQrPaymentPanel() : renderQrWalletChoicePanel() }),
27966
+ activeTab === PAYMENT_TABS.QR && /* @__PURE__ */ jsx(Fragment, { children: renderQrWalletChoicePanel() }),
27936
27967
  activeTab === PAYMENT_TABS.TRANSFER && /* @__PURE__ */ jsxs(Fragment, { children: [
27937
27968
  isCrossChainTransferSetupView && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
27938
27969
  renderCheckoutSelect({
@@ -27940,8 +27971,8 @@ const CoinleyPaymentInternal = ({
27940
27971
  label: "Select a Network",
27941
27972
  value: ccOriginChainId,
27942
27973
  placeholder: "Select a network",
27943
- options: ccSources.map((s) => ({ id: String(s.chainId), chainId: s.chainId })),
27944
- getLabel: (o) => ccChainName(o.chainId),
27974
+ options: ccSources.map((s) => ({ id: String(s.chainId), chainId: s.chainId, name: s.name })),
27975
+ getLabel: (o) => o.name || ccChainName(o.chainId),
27945
27976
  getIcon: (o) => ccChainIcon(o.chainId),
27946
27977
  compact: true,
27947
27978
  elevated: true,
@@ -27949,6 +27980,7 @@ const CoinleyPaymentInternal = ({
27949
27980
  onChange: (chainId) => {
27950
27981
  setCcOriginChainId(chainId);
27951
27982
  setCcOriginToken(null);
27983
+ setCcError(null);
27952
27984
  }
27953
27985
  }),
27954
27986
  renderCheckoutSelect({
@@ -28123,6 +28155,7 @@ const CoinleyPaymentInternal = ({
28123
28155
  setPaymentData(null);
28124
28156
  setQrCodeDataUrl("");
28125
28157
  setQrWalletChoiceConfirmed(false);
28158
+ setQrSelectedWalletId(null);
28126
28159
  };
28127
28160
  const isCheckoutDropdownOpen = [
28128
28161
  "transfer-network",
@@ -28133,42 +28166,44 @@ const CoinleyPaymentInternal = ({
28133
28166
  "cross-chain-network",
28134
28167
  "cross-chain-token"
28135
28168
  ].includes(openCheckoutDropdown);
28136
- return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
28137
- /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
28138
- /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative bg-white rounded-t-[24px] shadow-2xl w-full max-h-[96dvh] overflow-hidden flex flex-col animate-slide-up-sheet" : `relative bg-white rounded-[28px] shadow-2xl w-[430px] ${isTransferAddressGenerated ? "h-[640px]" : "h-[600px]"} max-h-[calc(100vh-32px)] overflow-hidden flex flex-col`, children: [
28139
- !isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [
28140
- /* @__PURE__ */ jsx("span", { className: `pointer-events-none absolute left-[-10px] ${isTransferAddressGenerated ? "top-[36%]" : "top-[44%]"} z-20 h-5 w-5 rounded-full bg-black/50` }),
28141
- /* @__PURE__ */ jsx("span", { className: `pointer-events-none absolute right-[-10px] ${isTransferAddressGenerated ? "top-[36%]" : "top-[44%]"} z-20 h-5 w-5 rounded-full bg-black/50` })
28142
- ] }),
28143
- isMobile && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-3 pb-1 flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 bg-gray-300 rounded-full" }) }),
28144
- /* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-1 flex-col ${isMobile ? "px-3" : "px-4"} ${isTightWalletView ? "pb-2 pt-3" : "pb-4 pt-4"}`, children: [
28145
- /* @__PURE__ */ jsxs("div", { className: `${isTightWalletView ? "mb-3" : "mb-5"} flex items-center justify-between`, children: [
28146
- isTransferAddressGenerated || isWalletReadyForPayment || isQrPaymentActiveView || isWalletBackHeaderView || isWalletTokenSelectionView ? /* @__PURE__ */ jsx(
28147
- "button",
28148
- {
28149
- onClick: isTransferAddressGenerated ? handleTransferAddressBack : isQrPaymentActiveView ? handleQrBack : isWalletTokenSelectionView ? handleWalletTokenSelectionBack : handleWalletReadyBack,
28150
- className: `${isTightWalletView ? "h-8 w-8" : "h-9 w-9"} flex items-center justify-center rounded-full border border-[#E5E7EB] text-[#111827] transition-colors hover:bg-gray-50`,
28151
- "aria-label": "Go back",
28152
- children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
28153
- }
28154
- ) : /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-[#424653]", children: "Send Money" }),
28155
- /* @__PURE__ */ jsx(
28156
- "button",
28157
- {
28158
- onClick: handleCancel,
28159
- className: "flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
28160
- "aria-label": "Close payment modal",
28161
- children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
28162
- }
28163
- )
28169
+ return renderInPortal(
28170
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
28171
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
28172
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative bg-white rounded-t-[24px] shadow-2xl w-full max-h-[96dvh] overflow-hidden flex flex-col animate-slide-up-sheet" : `relative bg-white rounded-[28px] shadow-2xl w-[430px] ${isTransferAddressGenerated ? "h-[640px]" : "h-[600px]"} max-h-[calc(100vh-32px)] overflow-hidden flex flex-col`, children: [
28173
+ !isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [
28174
+ /* @__PURE__ */ jsx("span", { className: `pointer-events-none absolute left-[-10px] ${isTransferAddressGenerated ? "top-[36%]" : "top-[44%]"} z-20 h-5 w-5 rounded-full bg-black/50` }),
28175
+ /* @__PURE__ */ jsx("span", { className: `pointer-events-none absolute right-[-10px] ${isTransferAddressGenerated ? "top-[36%]" : "top-[44%]"} z-20 h-5 w-5 rounded-full bg-black/50` })
28164
28176
  ] }),
28165
- renderPaymentSummary(),
28166
- renderMethodTabs(),
28167
- /* @__PURE__ */ jsx("div", { className: `min-h-0 flex-1 ${isCheckoutDropdownOpen ? "overflow-visible" : "overflow-y-auto coinley-scroll"} pb-1`, children: renderTabContent() }),
28168
- renderCheckoutFooter()
28169
- ] })
28170
- ] }) })
28171
- ] });
28177
+ isMobile && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-3 pb-1 flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 bg-gray-300 rounded-full" }) }),
28178
+ /* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-1 flex-col ${isMobile ? "px-3" : "px-4"} ${isTightWalletView ? "pb-2 pt-3" : "pb-4 pt-4"}`, children: [
28179
+ /* @__PURE__ */ jsxs("div", { className: `${isTightWalletView ? "mb-3" : "mb-5"} flex items-center justify-between`, children: [
28180
+ isTransferAddressGenerated || isWalletReadyForPayment || isQrPaymentActiveView || isWalletBackHeaderView || isWalletTokenSelectionView ? /* @__PURE__ */ jsx(
28181
+ "button",
28182
+ {
28183
+ onClick: isTransferAddressGenerated ? handleTransferAddressBack : isQrPaymentActiveView ? handleQrBack : isWalletTokenSelectionView ? handleWalletTokenSelectionBack : handleWalletReadyBack,
28184
+ className: `${isTightWalletView ? "h-8 w-8" : "h-9 w-9"} flex items-center justify-center rounded-full border border-[#E5E7EB] text-[#111827] transition-colors hover:bg-gray-50`,
28185
+ "aria-label": "Go back",
28186
+ children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
28187
+ }
28188
+ ) : /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-[#424653]", children: "Send Money" }),
28189
+ /* @__PURE__ */ jsx(
28190
+ "button",
28191
+ {
28192
+ onClick: handleCancel,
28193
+ className: "flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
28194
+ "aria-label": "Close payment modal",
28195
+ children: /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
28196
+ }
28197
+ )
28198
+ ] }),
28199
+ renderPaymentSummary(),
28200
+ renderMethodTabs(),
28201
+ /* @__PURE__ */ jsx("div", { className: `min-h-0 flex-1 ${isCheckoutDropdownOpen ? "overflow-visible" : "overflow-y-auto coinley-scroll"} pb-1`, children: renderTabContent() }),
28202
+ renderCheckoutFooter()
28203
+ ] })
28204
+ ] }) })
28205
+ ] })
28206
+ );
28172
28207
  };
28173
28208
  const CoinleyPayment = (props) => {
28174
28209
  const { apiUrl, publicKey: publicKey2, enableAgentDiscovery = true } = props;
@@ -28203,4 +28238,4 @@ export {
28203
28238
  chainTransports as c,
28204
28239
  isFeatureEnabled as i
28205
28240
  };
28206
- //# sourceMappingURL=CoinleyPayment-Uw8bsaCt.js.map
28241
+ //# sourceMappingURL=CoinleyPayment-BofSrJBx.js.map