coinley-pay 0.66.0 → 0.67.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.
@@ -6,7 +6,7 @@ import { useState, useRef, useEffect, useCallback, useMemo } from "react";
6
6
  import ReactDOM, { createPortal } from "react-dom";
7
7
  import { useConnect, useAccount, useSwitchChain, useSendTransaction, useWaitForTransactionReceipt, WagmiProvider, useDisconnect } from "wagmi";
8
8
  import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
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-BK2u3J1p.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-DGh12VkT.js";
10
10
  import { createConfig, fallback, http, getAccount as getAccount$1, getWalletClient, simulateContract, writeContract, readContract, waitForTransactionReceipt, estimateFeesPerGas as estimateFeesPerGas$1 } from "@wagmi/core";
11
11
  import { injected, metaMask, coinbaseWallet, walletConnect } from "@wagmi/connectors";
12
12
  import { defineChain as defineChain$1, erc20Abi, http as http$1, createPublicClient, fallback as fallback$1 } from "viem";
@@ -21126,7 +21126,7 @@ const WalletSelector = ({
21126
21126
  try {
21127
21127
  setAppKitError(null);
21128
21128
  setWalletConnectAddress(solanaAccountState.address);
21129
- const { createWalletConnectAdapter } = await import("./appKitSolana-BYyu0_pA.js");
21129
+ const { createWalletConnectAdapter } = await import("./appKitSolana-BQz-5FDf.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-CymaRMbc.js");
21234
+ const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-DNCl1Pga.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-BYyu0_pA.js");
21254
+ const { initializeAppKitSolana } = await import("./appKitSolana-BQz-5FDf.js");
21255
21255
  console.log("✅ Module loaded, initializing...");
21256
21256
  const modal = await initializeAppKitSolana(solanaWallet);
21257
21257
  console.log("✅ AppKit Solana initialized successfully");
@@ -26715,6 +26715,49 @@ const CoinleyPaymentInternal = ({
26715
26715
  return `${hash.slice(0, 7)}...${hash.slice(-8)}`;
26716
26716
  };
26717
26717
  if (!isOpen) return null;
26718
+ if (refundRequestStatus === "pending") {
26719
+ return renderInPortal(
26720
+ /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26721
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: onClose }),
26722
+ /* @__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-5 pb-6 pt-7 shadow-2xl animate-slide-up-sheet" : "relative flex h-auto min-h-[540px] w-[430px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-5 pb-5 pt-7 shadow-2xl", children: [
26723
+ /* @__PURE__ */ jsx(
26724
+ "button",
26725
+ {
26726
+ type: "button",
26727
+ onClick: onClose,
26728
+ 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",
26729
+ "aria-label": "Close payment modal",
26730
+ 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" }) })
26731
+ }
26732
+ ),
26733
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-6", children: [
26734
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center justify-center text-center", children: [
26735
+ /* @__PURE__ */ jsx("div", { className: "mb-5 flex h-[72px] w-[72px] items-center justify-center rounded-full bg-[#DDF8E7]", children: /* @__PURE__ */ jsx("div", { className: "flex h-14 w-14 items-center justify-center rounded-full bg-[#22C55E] text-white", children: /* @__PURE__ */ jsx("svg", { className: "h-6 w-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) }) }) }),
26736
+ /* @__PURE__ */ jsx("h3", { className: "mb-3 text-base font-bold text-[#111827]", children: "Refund request received" }),
26737
+ /* @__PURE__ */ jsx("p", { className: "text-[17px] leading-6 text-[#111827]", children: "Your refund is being processed automatically." }),
26738
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-[17px] leading-6 text-[#A9ABB2]", children: "You can safely close the modal" })
26739
+ ] }),
26740
+ /* @__PURE__ */ jsxs("div", { className: "mt-8 border-t border-[#EEF0F4] pt-4", children: [
26741
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
26742
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[#8B8E98]", children: "Status" }),
26743
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[#111827]", children: "Processing" })
26744
+ ] }),
26745
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-[#9CA0A8]", children: "Typically takes about 5 - 10 minutes." })
26746
+ ] }),
26747
+ /* @__PURE__ */ jsx(
26748
+ "button",
26749
+ {
26750
+ type: "button",
26751
+ onClick: onClose,
26752
+ className: "mt-5 h-[52px] w-full rounded-xl bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
26753
+ children: "Close"
26754
+ }
26755
+ )
26756
+ ] })
26757
+ ] }) })
26758
+ ] })
26759
+ );
26760
+ }
26718
26761
  if (currentStep === PAYMENT_STEPS.PROCESSING) {
26719
26762
  return renderInPortal(
26720
26763
  /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
@@ -28559,4 +28602,4 @@ export {
28559
28602
  chainTransports as c,
28560
28603
  isFeatureEnabled as i
28561
28604
  };
28562
- //# sourceMappingURL=CoinleyPayment-CbWEGZOi.js.map
28605
+ //# sourceMappingURL=CoinleyPayment-CiCtB3P8.js.map
@@ -1,4 +1,4 @@
1
- import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-CbWEGZOi.js";
1
+ import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-CiCtB3P8.js";
2
2
  const logo = "https://coinley.io/logo.png";
3
3
  let appKitInstance = null;
4
4
  let isInitializing = false;
@@ -113,4 +113,4 @@ export {
113
113
  initializeAppKitEVM,
114
114
  openAppKitModal
115
115
  };
116
- //# sourceMappingURL=appKitEVM-CymaRMbc.js.map
116
+ //# sourceMappingURL=appKitEVM-DNCl1Pga.js.map
@@ -1,4 +1,4 @@
1
- import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-CbWEGZOi.js";
1
+ import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-CiCtB3P8.js";
2
2
  const logo = "https://coinley.io/logo.png";
3
3
  let appKitInstance = null;
4
4
  let isInitializing = false;
@@ -243,4 +243,4 @@ export {
243
243
  disconnectWalletConnect,
244
244
  initializeAppKitSolana
245
245
  };
246
- //# sourceMappingURL=appKitSolana-BYyu0_pA.js.map
246
+ //# sourceMappingURL=appKitSolana-BQz-5FDf.js.map