coinley-pay 0.58.0 → 0.60.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-CGI_tFbK.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-bVSNOcZr.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",
@@ -20639,7 +20639,7 @@ const ModernDropdown = ({
20639
20639
  "div",
20640
20640
  {
20641
20641
  ref: dropdownRef,
20642
- className: "fixed bg-white border-2 border-gray-200 rounded-3xl shadow-2xl overflow-hidden",
20642
+ className: "coinley-pay-sdk-root fixed bg-white border-2 border-gray-200 rounded-3xl shadow-2xl overflow-hidden",
20643
20643
  style: {
20644
20644
  top: dropdownPosition.top,
20645
20645
  left: dropdownPosition.left,
@@ -21126,7 +21126,7 @@ const WalletSelector = ({
21126
21126
  try {
21127
21127
  setAppKitError(null);
21128
21128
  setWalletConnectAddress(solanaAccountState.address);
21129
- const { createWalletConnectAdapter } = await import("./appKitSolana-CyvPAMFC.js");
21129
+ const { createWalletConnectAdapter } = await import("./appKitSolana-BeXOnse3.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-CB-nBf-9.js");
21234
+ const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-rZ-uPbNm.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-CyvPAMFC.js");
21254
+ const { initializeAppKitSolana } = await import("./appKitSolana-BeXOnse3.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,
@@ -26527,235 +26528,243 @@ const CoinleyPaymentInternal = ({
26527
26528
  };
26528
26529
  if (!isOpen) return null;
26529
26530
  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: [
26531
+ return renderInPortal(
26532
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26533
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
26534
+ /* @__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
26535
  /* @__PURE__ */ jsx(
26576
26536
  "button",
26577
26537
  {
26578
- type: "button",
26579
- onClick: onClose,
26538
+ onClick: handleCancel,
26580
26539
  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
26540
  "aria-label": "Close payment modal",
26582
26541
  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
26542
  }
26584
26543
  ),
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 })
26544
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center justify-center pt-8 text-center", children: [
26545
+ /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className: "mb-5 h-24 w-36 object-contain" }),
26546
+ /* @__PURE__ */ jsx("h3", { className: "mb-2 text-2xl font-semibold text-black", children: "Please wait..." }),
26547
+ /* @__PURE__ */ jsxs("p", { className: "mx-auto mb-7 max-w-[370px] text-base leading-6 text-[#9EA0A8]", children: [
26548
+ "Your transaction ",
26549
+ /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26550
+ "$",
26551
+ formatAmount(paymentAmount || (config == null ? void 0 : config.amount) || 0)
26626
26552
  ] }),
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
- )
26553
+ " has been sent to the blockchain and is being processed..."
26641
26554
  ] }),
26555
+ /* @__PURE__ */ jsxs("div", { className: "mb-16 w-full", children: [
26556
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[40px_1fr_40px] items-center gap-4", children: [
26557
+ /* @__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" }) }) }),
26558
+ /* @__PURE__ */ jsx("div", { className: "border-t border-dashed border-[#DFE1E7]" }),
26559
+ /* @__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" }) })
26560
+ ] }),
26561
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 grid grid-cols-[1fr_1fr] text-xs", children: [
26562
+ /* @__PURE__ */ jsx("p", { className: "text-left text-[#9EA0A8]", children: "Transaction submitted" }),
26563
+ /* @__PURE__ */ jsx("p", { className: "text-right font-semibold text-black", children: "confirming payment..." })
26564
+ ] })
26565
+ ] })
26566
+ ] }),
26567
+ /* @__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" }),
26568
+ /* @__PURE__ */ jsx("p", { className: "mt-4 text-center text-xs text-[#A9ABB2]", children: "Powered by Stablezact" })
26569
+ ] }) })
26570
+ ] })
26571
+ );
26572
+ }
26573
+ if (currentStep === PAYMENT_STEPS.SUCCESS) {
26574
+ if (offsetSuccessDetails) {
26575
+ return renderInPortal(
26576
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26577
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26578
+ /* @__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
26579
  /* @__PURE__ */ jsx(
26643
26580
  "button",
26644
26581
  {
26645
26582
  type: "button",
26646
26583
  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"
26584
+ 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",
26585
+ "aria-label": "Close payment modal",
26586
+ 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
26587
  }
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
- )
26588
+ ),
26589
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-[68px]", children: [
26590
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 text-center", children: [
26591
+ /* @__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" }) }) }) }),
26592
+ /* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-medium text-black", children: "Offset Successful" }),
26593
+ /* @__PURE__ */ jsxs("p", { className: "text-base text-[#A9ABB2]", children: [
26594
+ /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26595
+ "$",
26596
+ formatAmount(offsetSuccessDetails.amount || 0)
26597
+ ] }),
26598
+ " ",
26599
+ "sent to ",
26600
+ offsetSuccessDetails.merchantName
26700
26601
  ] })
26701
26602
  ] }),
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) })
26603
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 space-y-0", children: [
26604
+ /* @__PURE__ */ jsxs("div", { children: [
26605
+ /* @__PURE__ */ jsx("p", { className: "mb-1.5 text-xs text-[#4B5563]", children: "Transaction ID" }),
26606
+ /* @__PURE__ */ jsxs("div", { className: "flex h-11 items-center justify-between rounded-lg border border-[#EEF0F4] bg-[#FAFAFB] px-3", children: [
26607
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-black", children: truncateTransactionId(offsetSuccessDetails.transactionHash) }),
26608
+ /* @__PURE__ */ jsx(
26609
+ "button",
26610
+ {
26611
+ type: "button",
26612
+ onClick: () => copyToClipboard(offsetSuccessDetails.transactionHash, "offsetSuccessTx"),
26613
+ className: "ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#111827] transition-colors hover:bg-gray-100",
26614
+ "aria-label": "Copy transaction ID",
26615
+ 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: [
26616
+ /* @__PURE__ */ jsx("rect", { x: "8", y: "7", width: "10", height: "13", rx: "2", strokeWidth: "1.7" }),
26617
+ /* @__PURE__ */ jsx("path", { d: "M6 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v1", strokeWidth: "1.7", strokeLinecap: "round" })
26618
+ ] })
26619
+ }
26620
+ )
26621
+ ] })
26622
+ ] }),
26623
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26624
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Network" }),
26625
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.networkName })
26626
+ ] }),
26627
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-3", children: [
26628
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Token" }),
26629
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.tokenSymbol })
26630
+ ] }),
26631
+ offsetSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
26632
+ "a",
26633
+ {
26634
+ href: offsetSuccessDetails.explorerUrl,
26635
+ target: "_blank",
26636
+ rel: "noopener noreferrer",
26637
+ 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]",
26638
+ children: [
26639
+ "View on ",
26640
+ offsetSuccessDetails.explorerName,
26641
+ /* @__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" }) })
26642
+ ]
26643
+ }
26644
+ )
26713
26645
  ] }),
26714
- refundSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
26715
- "a",
26646
+ /* @__PURE__ */ jsx(
26647
+ "button",
26716
26648
  {
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
- ]
26649
+ type: "button",
26650
+ onClick: onClose,
26651
+ className: "mt-auto h-12 w-full rounded-lg bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
26652
+ children: "Close"
26726
26653
  }
26727
26654
  )
26728
- ] }),
26655
+ ] })
26656
+ ] }) })
26657
+ ] })
26658
+ );
26659
+ }
26660
+ if (refundSuccessDetails) {
26661
+ return renderInPortal(
26662
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26663
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26664
+ /* @__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
26665
  /* @__PURE__ */ jsx(
26730
26666
  "button",
26731
26667
  {
26732
26668
  type: "button",
26733
26669
  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"
26670
+ 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",
26671
+ "aria-label": "Close payment modal",
26672
+ 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
26673
  }
26737
- )
26738
- ] })
26739
- ] }) })
26740
- ] });
26674
+ ),
26675
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-[68px]", children: [
26676
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 text-center", children: [
26677
+ /* @__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" }) }) }) }),
26678
+ /* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-medium text-black", children: "Refund Successful" }),
26679
+ /* @__PURE__ */ jsxs("p", { className: "text-base text-[#A9ABB2]", children: [
26680
+ /* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
26681
+ "$",
26682
+ formatAmount(refundSuccessDetails.amount || 0)
26683
+ ] }),
26684
+ " ",
26685
+ "refunded to your wallet"
26686
+ ] })
26687
+ ] }),
26688
+ /* @__PURE__ */ jsxs("div", { className: "mb-9 space-y-0", children: [
26689
+ refundSuccessDetails.transactionHash && /* @__PURE__ */ jsxs("div", { children: [
26690
+ /* @__PURE__ */ jsx("p", { className: "mb-1.5 text-xs text-[#4B5563]", children: "Transaction ID" }),
26691
+ /* @__PURE__ */ jsxs("div", { className: "flex h-11 items-center justify-between rounded-lg border border-[#EEF0F4] bg-[#FAFAFB] px-3", children: [
26692
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-black", children: truncateTransactionId(refundSuccessDetails.transactionHash) }),
26693
+ /* @__PURE__ */ jsx(
26694
+ "button",
26695
+ {
26696
+ type: "button",
26697
+ onClick: () => copyToClipboard(refundSuccessDetails.transactionHash, "refundSuccessTx"),
26698
+ className: "ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#111827] transition-colors hover:bg-gray-100",
26699
+ "aria-label": "Copy transaction ID",
26700
+ 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: [
26701
+ /* @__PURE__ */ jsx("rect", { x: "8", y: "7", width: "10", height: "13", rx: "2", strokeWidth: "1.7" }),
26702
+ /* @__PURE__ */ jsx("path", { d: "M6 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v1", strokeWidth: "1.7", strokeLinecap: "round" })
26703
+ ] })
26704
+ }
26705
+ )
26706
+ ] })
26707
+ ] }),
26708
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26709
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Network" }),
26710
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: refundSuccessDetails.networkName })
26711
+ ] }),
26712
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
26713
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Token" }),
26714
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: refundSuccessDetails.tokenSymbol })
26715
+ ] }),
26716
+ refundSuccessDetails.recipientAddress && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-3", children: [
26717
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Wallet" }),
26718
+ /* @__PURE__ */ jsx("span", { className: "max-w-[220px] truncate text-sm font-medium text-black", children: truncateAddress(refundSuccessDetails.recipientAddress) })
26719
+ ] }),
26720
+ refundSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
26721
+ "a",
26722
+ {
26723
+ href: refundSuccessDetails.explorerUrl,
26724
+ target: "_blank",
26725
+ rel: "noopener noreferrer",
26726
+ 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]",
26727
+ children: [
26728
+ "View on ",
26729
+ refundSuccessDetails.explorerName,
26730
+ /* @__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" }) })
26731
+ ]
26732
+ }
26733
+ )
26734
+ ] }),
26735
+ /* @__PURE__ */ jsx(
26736
+ "button",
26737
+ {
26738
+ type: "button",
26739
+ onClick: onClose,
26740
+ className: "mt-auto h-12 w-full rounded-lg bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
26741
+ children: "Close"
26742
+ }
26743
+ )
26744
+ ] })
26745
+ ] }) })
26746
+ ] })
26747
+ );
26741
26748
  }
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
- ] });
26749
+ return renderInPortal(
26750
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26751
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26752
+ /* @__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(
26753
+ PaymentStatus,
26754
+ {
26755
+ status: "success",
26756
+ message: "Payment completed successfully!",
26757
+ theme,
26758
+ payment: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.payment) || paymentData,
26759
+ transactionHash: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.transactionHash) || (isSolana ? solanaTransaction.txSignature || (paymentData == null ? void 0 : paymentData.transactionHash) : currentTransactionHash || (paymentData == null ? void 0 : paymentData.transactionHash)),
26760
+ selectedPaymentMethod: selectedToken,
26761
+ selectedNetwork: (ccSuccessDetails == null ? void 0 : ccSuccessDetails.network) || selectedNetwork,
26762
+ merchantName: (config == null ? void 0 : config.merchantName) || "Merchant",
26763
+ onClose
26764
+ }
26765
+ ) }) })
26766
+ ] })
26767
+ );
26759
26768
  }
26760
26769
  const paymentAmountLabel = isConverting ? "..." : `$${formatAmount(paymentAmount || (config == null ? void 0 : config.amount) || 0)}`;
26761
26770
  const underpaymentOffsetAmountLabel = underpaymentInfo ? `${formatAmount(underpaymentInfo.shortfallAmount || 0)} ${underpaymentInfo.tokenSymbol || (selectedToken == null ? void 0 : selectedToken.symbol) || ""}`.trim() : paymentAmountLabel;
@@ -28133,42 +28142,44 @@ const CoinleyPaymentInternal = ({
28133
28142
  "cross-chain-network",
28134
28143
  "cross-chain-token"
28135
28144
  ].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
- )
28145
+ return renderInPortal(
28146
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
28147
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
28148
+ /* @__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: [
28149
+ !isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [
28150
+ /* @__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` }),
28151
+ /* @__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
28152
  ] }),
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
- ] });
28153
+ 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" }) }),
28154
+ /* @__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: [
28155
+ /* @__PURE__ */ jsxs("div", { className: `${isTightWalletView ? "mb-3" : "mb-5"} flex items-center justify-between`, children: [
28156
+ isTransferAddressGenerated || isWalletReadyForPayment || isQrPaymentActiveView || isWalletBackHeaderView || isWalletTokenSelectionView ? /* @__PURE__ */ jsx(
28157
+ "button",
28158
+ {
28159
+ onClick: isTransferAddressGenerated ? handleTransferAddressBack : isQrPaymentActiveView ? handleQrBack : isWalletTokenSelectionView ? handleWalletTokenSelectionBack : handleWalletReadyBack,
28160
+ 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`,
28161
+ "aria-label": "Go back",
28162
+ 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" }) })
28163
+ }
28164
+ ) : /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-[#424653]", children: "Send Money" }),
28165
+ /* @__PURE__ */ jsx(
28166
+ "button",
28167
+ {
28168
+ onClick: handleCancel,
28169
+ className: "flex h-8 w-8 items-center justify-center rounded-full text-[#111827] transition-colors hover:bg-gray-100",
28170
+ "aria-label": "Close payment modal",
28171
+ 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" }) })
28172
+ }
28173
+ )
28174
+ ] }),
28175
+ renderPaymentSummary(),
28176
+ renderMethodTabs(),
28177
+ /* @__PURE__ */ jsx("div", { className: `min-h-0 flex-1 ${isCheckoutDropdownOpen ? "overflow-visible" : "overflow-y-auto coinley-scroll"} pb-1`, children: renderTabContent() }),
28178
+ renderCheckoutFooter()
28179
+ ] })
28180
+ ] }) })
28181
+ ] })
28182
+ );
28172
28183
  };
28173
28184
  const CoinleyPayment = (props) => {
28174
28185
  const { apiUrl, publicKey: publicKey2, enableAgentDiscovery = true } = props;
@@ -28203,4 +28214,4 @@ export {
28203
28214
  chainTransports as c,
28204
28215
  isFeatureEnabled as i
28205
28216
  };
28206
- //# sourceMappingURL=CoinleyPayment-CzdU_Qtr.js.map
28217
+ //# sourceMappingURL=CoinleyPayment-BTrq3zIS.js.map