coinley-pay 0.51.0 → 0.53.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.
@@ -5,7 +5,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
5
5
  import { useState, useRef, useEffect, useCallback, useMemo } from "react";
6
6
  import { useConnect, useAccount, useSwitchChain, useSendTransaction, useWaitForTransactionReceipt, WagmiProvider, useDisconnect } from "wagmi";
7
7
  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-D5OEATPc.js";
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-DkzxitOg.js";
9
9
  import { createConfig, fallback, http, getAccount as getAccount$1, getWalletClient, simulateContract, writeContract, readContract, waitForTransactionReceipt, estimateFeesPerGas as estimateFeesPerGas$1 } from "@wagmi/core";
10
10
  import { injected, metaMask, coinbaseWallet, walletConnect } from "@wagmi/connectors";
11
11
  import { defineChain as defineChain$1, erc20Abi, http as http$1, createPublicClient, fallback as fallback$1 } from "viem";
@@ -2475,8 +2475,12 @@ class SimplePaymentAPI {
2475
2475
  // customer sends to a Relay-generated source-chain address that bridges to the
2476
2476
  // merchant's settlement chain. Backend resolves the destination.
2477
2477
  async getCrossChainSources() {
2478
+ var _a;
2478
2479
  const result = await this.request("/api/payments/cross-chain/sources");
2479
- return (result == null ? void 0 : result.sources) || [];
2480
+ if (Array.isArray(result)) return result;
2481
+ if (Array.isArray(result == null ? void 0 : result.sources)) return result.sources;
2482
+ if (Array.isArray((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.sources)) return result.data.sources;
2483
+ return [];
2480
2484
  }
2481
2485
  async createCrossChainPayment(data) {
2482
2486
  return await this.request("/api/payments/cross-chain/create", {
@@ -21122,7 +21126,7 @@ const WalletSelector = ({
21122
21126
  try {
21123
21127
  setAppKitError(null);
21124
21128
  setWalletConnectAddress(solanaAccountState.address);
21125
- const { createWalletConnectAdapter } = await import("./appKitSolana-Bc3C3YDl.js");
21129
+ const { createWalletConnectAdapter } = await import("./appKitSolana-B1EqivHA.js");
21126
21130
  const adapter = createWalletConnectAdapter(solanaAccountState.address);
21127
21131
  await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
21128
21132
  console.log("✅ WalletConnect synced with SDK");
@@ -21227,7 +21231,7 @@ const WalletSelector = ({
21227
21231
  setAppKitLoading(true);
21228
21232
  setAppKitError(null);
21229
21233
  try {
21230
- const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-Bzcdqksa.js");
21234
+ const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-BC0nAR77.js");
21231
21235
  await initializeAppKitEVM(wagmiConfig);
21232
21236
  await openAppKitModal();
21233
21237
  } catch (error) {
@@ -21247,7 +21251,7 @@ const WalletSelector = ({
21247
21251
  setAppKitError(null);
21248
21252
  try {
21249
21253
  console.log("📦 Loading AppKit Solana module...");
21250
- const { initializeAppKitSolana } = await import("./appKitSolana-Bc3C3YDl.js");
21254
+ const { initializeAppKitSolana } = await import("./appKitSolana-B1EqivHA.js");
21251
21255
  console.log("✅ Module loaded, initializing...");
21252
21256
  const modal = await initializeAppKitSolana(solanaWallet);
21253
21257
  console.log("✅ AppKit Solana initialized successfully");
@@ -23318,6 +23322,7 @@ const CoinleyPaymentInternal = ({
23318
23322
  const [ccError, setCcError] = useState(null);
23319
23323
  const [ccGenerating, setCcGenerating] = useState(false);
23320
23324
  const [ccManualCheckStatus, setCcManualCheckStatus] = useState("idle");
23325
+ const [ccRefundPendingInfo, setCcRefundPendingInfo] = useState(null);
23321
23326
  const ccSucceeded = useRef(false);
23322
23327
  const ccStatusPollInFlight = useRef(false);
23323
23328
  const ccSourcesRetryTimer = useRef(null);
@@ -23734,6 +23739,7 @@ const CoinleyPaymentInternal = ({
23734
23739
  setCcManualCheckStatus(null);
23735
23740
  setRecoveryLoadingAction(null);
23736
23741
  setRecoveryLoadingStatus(null);
23742
+ setCcRefundPendingInfo(null);
23737
23743
  clearUnderpaymentRecovery(paymentId || activeTransferPaymentId);
23738
23744
  }, [activeTransferPaymentId, clearUnderpaymentRecovery]);
23739
23745
  useEffect(() => {
@@ -23741,6 +23747,7 @@ const CoinleyPaymentInternal = ({
23741
23747
  setRefundSuccessDetails(null);
23742
23748
  setRecoveryLoadingAction(null);
23743
23749
  setRecoveryLoadingStatus(null);
23750
+ setCcRefundPendingInfo(null);
23744
23751
  }, [paymentData == null ? void 0 : paymentData.id]);
23745
23752
  const selectedNetworkIsSolana = (selectedNetwork == null ? void 0 : selectedNetwork.chainType) === "solana" || (selectedNetwork == null ? void 0 : selectedNetwork.shortName) === "solana";
23746
23753
  const sourceNeedsMerchantBridge = Boolean(
@@ -25306,6 +25313,19 @@ const CoinleyPaymentInternal = ({
25306
25313
  description: "We will process it automatically.",
25307
25314
  detail: `Refunding the received ${(underpaymentInfo == null ? void 0 : underpaymentInfo.tokenSymbol) || (selectedToken == null ? void 0 : selectedToken.symbol) || "tokens"} on ${(underpaymentInfo == null ? void 0 : underpaymentInfo.refundNetworkLabel) || (selectedNetwork == null ? void 0 : selectedNetwork.name) || (selectedNetwork == null ? void 0 : selectedNetwork.shortName) || "the selected network"}.`
25308
25315
  }), [selectedNetwork == null ? void 0 : selectedNetwork.name, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, underpaymentInfo == null ? void 0 : underpaymentInfo.refundNetworkLabel, underpaymentInfo == null ? void 0 : underpaymentInfo.tokenSymbol]);
25316
+ const getCrossChainRefundPendingStatus = useCallback((status = ccRefundPendingInfo) => {
25317
+ var _a2, _b, _c, _d;
25318
+ const details = (status == null ? void 0 : status.refundPendingDetails) || {};
25319
+ const tokenSymbol = ((_a2 = status == null ? void 0 : status.underpayment) == null ? void 0 : _a2.tokenSymbol) || ((_b = status == null ? void 0 : status.underpayment) == null ? void 0 : _b.currency) || (underpaymentInfo == null ? void 0 : underpaymentInfo.tokenSymbol) || (ccOriginToken == null ? void 0 : ccOriginToken.symbol) || (selectedToken == null ? void 0 : selectedToken.symbol) || "tokens";
25320
+ const networkLabel = ((_c = status == null ? void 0 : status.underpayment) == null ? void 0 : _c.refundNetworkLabel) || (underpaymentInfo == null ? void 0 : underpaymentInfo.refundNetworkLabel) || ccChainName(((_d = status == null ? void 0 : status.relay) == null ? void 0 : _d.originChainId) || (ccResult == null ? void 0 : ccResult.originChainId) || ccOriginChainId);
25321
+ const refundAddressLabel = (status == null ? void 0 : status.refundRecipient) || refundAddress.trim();
25322
+ const available = details.available && details.available !== "0.0" ? ` Relay has returned ${details.available} ${tokenSymbol}.` : "";
25323
+ return {
25324
+ title: "Waiting for Relay refund",
25325
+ description: "Relay is returning the underpaid funds before Coinley can send your refund.",
25326
+ detail: `We will keep checking automatically and refund ${tokenSymbol} on ${networkLabel}${refundAddressLabel ? ` to ${truncateAddress(refundAddressLabel)}` : ""}.${available}`
25327
+ };
25328
+ }, [ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, ccRefundPendingInfo, ccResult == null ? void 0 : ccResult.originChainId, refundAddress, selectedToken == null ? void 0 : selectedToken.symbol, underpaymentInfo == null ? void 0 : underpaymentInfo.refundNetworkLabel, underpaymentInfo == null ? void 0 : underpaymentInfo.tokenSymbol]);
25309
25329
  useEffect(() => () => {
25310
25330
  if (recoveryLoadingTimeout.current) {
25311
25331
  clearTimeout(recoveryLoadingTimeout.current);
@@ -25321,6 +25341,7 @@ const CoinleyPaymentInternal = ({
25321
25341
  setCcPhase(status.phase);
25322
25342
  if (status.refundStatus === "refunded") {
25323
25343
  finishRecoveryLoading(() => {
25344
+ setCcRefundPendingInfo(null);
25324
25345
  ccSucceeded.current = true;
25325
25346
  setRefundRequestStatus("refunded");
25326
25347
  setRefundRequestMessage("");
@@ -25328,6 +25349,14 @@ const CoinleyPaymentInternal = ({
25328
25349
  clearUnderpaymentRecovery(status.paymentId || ccResult.id);
25329
25350
  setCurrentStep(PAYMENT_STEPS.SUCCESS);
25330
25351
  });
25352
+ } else if (status.refundStatus === "pending") {
25353
+ activateUnderpaymentFromCrossChainStatus(status);
25354
+ setCcRefundPendingInfo(status);
25355
+ setRefundRequestSubmitted(true);
25356
+ setRefundRequestStatus("pending");
25357
+ setRefundRequestMessage("");
25358
+ setCcManualCheckStatus(null);
25359
+ holdRecoveryLoading("refund", getCrossChainRefundPendingStatus(status));
25331
25360
  } else if (activateUnderpaymentFromCrossChainStatus(status)) {
25332
25361
  if (isOffsetRecovery) {
25333
25362
  setCcManualCheckStatus("not_found");
@@ -25387,17 +25416,29 @@ const CoinleyPaymentInternal = ({
25387
25416
  setCcPhase(s.phase);
25388
25417
  if (s.refundStatus === "refunded") {
25389
25418
  ccSucceeded.current = true;
25419
+ setCcRefundPendingInfo(null);
25390
25420
  setRefundRequestStatus("refunded");
25391
25421
  setRefundRequestMessage("");
25392
25422
  captureRefundSuccessDetails(s, s.refundTxHash, s.refundRecipient || refundAddress.trim());
25393
25423
  clearUnderpaymentRecovery(s.paymentId || ccResult.id);
25394
25424
  setCurrentStep(PAYMENT_STEPS.SUCCESS);
25425
+ } else if (s.refundStatus === "pending") {
25426
+ activateUnderpaymentFromCrossChainStatus(s);
25427
+ setCcRefundPendingInfo(s);
25428
+ setRefundRequestSubmitted(true);
25429
+ setRefundRequestStatus("pending");
25430
+ setRefundRequestMessage("");
25431
+ setCcManualCheckStatus(null);
25432
+ holdRecoveryLoading("refund", getCrossChainRefundPendingStatus(s));
25395
25433
  } else if (activateUnderpaymentFromCrossChainStatus(s)) {
25434
+ setCcRefundPendingInfo(null);
25396
25435
  setCcManualCheckStatus(null);
25397
25436
  } else if (s.phase === "bridging") {
25437
+ setCcRefundPendingInfo(null);
25398
25438
  clearUnderpaymentUiState(s.paymentId || ccResult.id);
25399
25439
  } else if (s.phase === "settled" && !ccSucceeded.current) {
25400
25440
  ccSucceeded.current = true;
25441
+ setCcRefundPendingInfo(null);
25401
25442
  onSuccess == null ? void 0 : onSuccess(s);
25402
25443
  }
25403
25444
  } catch {
@@ -25411,7 +25452,7 @@ const CoinleyPaymentInternal = ({
25411
25452
  cancelled = true;
25412
25453
  clearInterval(t);
25413
25454
  };
25414
- }, [activateUnderpaymentFromCrossChainStatus, captureRefundSuccessDetails, ccResult == null ? void 0 : ccResult.id, clearUnderpaymentRecovery, clearUnderpaymentUiState, onSuccess, paymentFlow.api, refundAddress]);
25455
+ }, [activateUnderpaymentFromCrossChainStatus, captureRefundSuccessDetails, ccResult == null ? void 0 : ccResult.id, clearUnderpaymentRecovery, clearUnderpaymentUiState, getCrossChainRefundPendingStatus, holdRecoveryLoading, onSuccess, paymentFlow.api, refundAddress]);
25415
25456
  const handleGenerateTransferAddress = async () => {
25416
25457
  if (isConverting) {
25417
25458
  setError("Please wait for currency conversion to complete");
@@ -26289,7 +26330,20 @@ const CoinleyPaymentInternal = ({
26289
26330
  });
26290
26331
  } else {
26291
26332
  setRefundRequestMessage("");
26292
- holdRecoveryLoading("refund", getRefundPendingStatus());
26333
+ if (ccResult) {
26334
+ const pendingStatus = {
26335
+ refundStatus: "pending",
26336
+ refundRecipient: trimmedAddress,
26337
+ underpayment: underpaymentInfo,
26338
+ relay: {
26339
+ originChainId: ccResult.originChainId || ccOriginChainId
26340
+ }
26341
+ };
26342
+ setCcRefundPendingInfo(pendingStatus);
26343
+ holdRecoveryLoading("refund", getCrossChainRefundPendingStatus(pendingStatus));
26344
+ } else {
26345
+ holdRecoveryLoading("refund", getRefundPendingStatus());
26346
+ }
26293
26347
  }
26294
26348
  } catch (error2) {
26295
26349
  console.warn("[RefundRequest] Error:", error2.message);
@@ -26299,7 +26353,7 @@ const CoinleyPaymentInternal = ({
26299
26353
  setRefundRequestMessage(error2.message || "Failed to submit refund request. Please try again.");
26300
26354
  });
26301
26355
  }
26302
- }, [activeTransferPaymentId, captureRefundSuccessDetails, ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, clearUnderpaymentRecovery, config, finishRecoveryLoading, getRefundPendingStatus, holdRecoveryLoading, refundAddress, refundRequestStatus, paymentFlow.api, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, startRecoveryLoading, underpaymentInfo]);
26356
+ }, [activeTransferPaymentId, captureRefundSuccessDetails, ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, ccResult, clearUnderpaymentRecovery, config, finishRecoveryLoading, getCrossChainRefundPendingStatus, getRefundPendingStatus, holdRecoveryLoading, refundAddress, refundRequestStatus, paymentFlow.api, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, startRecoveryLoading, underpaymentInfo]);
26303
26357
  const handleDepositManualCheck = useCallback(async () => {
26304
26358
  if (manualCheckStatus === "checking" || !(paymentData == null ? void 0 : paymentData.id)) return;
26305
26359
  const isOffsetRecovery = Boolean(underpaymentInfo && underpaymentView === "offset");
@@ -26395,7 +26449,7 @@ const CoinleyPaymentInternal = ({
26395
26449
  if (currentStep === PAYMENT_STEPS.PROCESSING) {
26396
26450
  return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26397
26451
  /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
26398
- /* @__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: [
26452
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-x-0 bottom-0 flex items-end justify-center" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex 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: [
26399
26453
  /* @__PURE__ */ jsx(
26400
26454
  "button",
26401
26455
  {
@@ -26437,7 +26491,7 @@ const CoinleyPaymentInternal = ({
26437
26491
  if (offsetSuccessDetails) {
26438
26492
  return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26439
26493
  /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26440
- /* @__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: [
26494
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-x-0 bottom-0 flex items-end justify-center" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex 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: [
26441
26495
  /* @__PURE__ */ jsx(
26442
26496
  "button",
26443
26497
  {
@@ -26521,7 +26575,7 @@ const CoinleyPaymentInternal = ({
26521
26575
  if (refundSuccessDetails) {
26522
26576
  return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26523
26577
  /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26524
- /* @__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: [
26578
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-x-0 bottom-0 flex items-end justify-center" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex 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: [
26525
26579
  /* @__PURE__ */ jsx(
26526
26580
  "button",
26527
26581
  {
@@ -26607,7 +26661,7 @@ const CoinleyPaymentInternal = ({
26607
26661
  }
26608
26662
  return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
26609
26663
  /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
26610
- /* @__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(
26664
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-x-0 bottom-0 flex items-end justify-center" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsx("div", { className: isMobile ? "coinley-mobile-sheet relative flex 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(
26611
26665
  PaymentStatus,
26612
26666
  {
26613
26667
  status: "success",
@@ -26658,11 +26712,11 @@ const CoinleyPaymentInternal = ({
26658
26712
  const isCompactCheckoutSetupView = isCrossChainTransferSetupView || isTransferSetupView || isQrSetupView || isWalletExtensionSetupView;
26659
26713
  const isCompactCheckoutView = isCompactCheckoutSetupView || isWalletExtensionReadyView || isWalletExtensionConfirmView;
26660
26714
  const isTightWalletView = isWalletExtensionReadyView || isWalletExtensionConfirmView;
26661
- const renderPaymentSummary = () => /* @__PURE__ */ jsxs("div", { className: isTightWalletView ? "mb-3" : isCompactCheckoutView ? "mb-6 mt-[-5px]" : "mb-8", children: [
26715
+ const renderPaymentSummary = () => /* @__PURE__ */ jsxs("div", { className: isMobile ? isTightWalletView ? "mb-2" : isCompactCheckoutView ? "mb-4 mt-[-3px]" : "mb-5" : isTightWalletView ? "mb-3" : isCompactCheckoutView ? "mb-6 mt-[-5px]" : "mb-8", children: [
26662
26716
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
26663
26717
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
26664
26718
  /* @__PURE__ */ jsx("p", { className: "text-[11px] leading-none text-[#9EA0A8] mb-1", children: "Sending to:" }),
26665
- /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-[#1F2430] truncate max-w-[120px]", children: (config == null ? void 0 : config.merchantName) || "Merchant" })
26719
+ /* @__PURE__ */ jsx("p", { className: `${isMobile ? "max-w-[110px]" : "max-w-[120px]"} truncate text-xs font-semibold text-[#1F2430]`, children: (config == null ? void 0 : config.merchantName) || "Merchant" })
26666
26720
  ] }),
26667
26721
  /* @__PURE__ */ jsx("div", { className: "flex-1 pt-[13px] border-t border-dashed border-[#DFE1E7]" }),
26668
26722
  /* @__PURE__ */ jsxs("div", { className: "text-right", children: [
@@ -26676,7 +26730,7 @@ const CoinleyPaymentInternal = ({
26676
26730
  ] }),
26677
26731
  currencyError && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-red-500 mt-2", children: currencyError })
26678
26732
  ] });
26679
- const renderMethodTabs = () => /* @__PURE__ */ jsxs("div", { className: isTightWalletView ? "mb-2" : isCompactCheckoutView ? "mb-3" : "mb-4", children: [
26733
+ const renderMethodTabs = () => /* @__PURE__ */ jsxs("div", { className: isMobile ? isTightWalletView ? "mb-2" : "mb-3" : isTightWalletView ? "mb-2" : isCompactCheckoutView ? "mb-3" : "mb-4", children: [
26680
26734
  /* @__PURE__ */ jsx("p", { className: `text-xs text-[#9EA0A8] ${isTightWalletView ? "mb-1" : "mb-2"}`, children: "Payment methods" }),
26681
26735
  /* @__PURE__ */ jsx("div", { className: "flex overflow-hidden rounded-xl bg-[#F6F6F7] p-1", children: [
26682
26736
  { tab: PAYMENT_TABS.TRANSFER, label: "Transfer to address" },
@@ -26687,13 +26741,13 @@ const CoinleyPaymentInternal = ({
26687
26741
  {
26688
26742
  type: "button",
26689
26743
  onClick: () => isMobile ? handleMobileTabSelect(method.tab) : setActiveTab(method.tab),
26690
- 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]"}`,
26744
+ className: `min-w-0 ${isMobile ? "h-8 px-1.5 text-[12px]" : 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]"}`,
26691
26745
  children: method.label
26692
26746
  },
26693
26747
  method.tab
26694
26748
  )) })
26695
26749
  ] });
26696
- const renderUnderpaymentWarning = (title = "Amount received is less than expected", description = null) => /* @__PURE__ */ jsxs("div", { className: "mb-5 rounded-lg border border-[#F5E5B8] bg-[#FFF9E8] px-3 py-2", children: [
26750
+ const renderUnderpaymentWarning = (title = "Amount received is less than expected", description = null) => /* @__PURE__ */ jsxs("div", { className: `${isMobile ? "mb-4" : "mb-5"} rounded-lg border border-[#F5E5B8] bg-[#FFF9E8] px-3 py-2`, children: [
26697
26751
  /* @__PURE__ */ jsxs("div", { className: `flex items-start gap-2 text-[#B54708] ${title && description ? "mb-1" : ""}`, children: [
26698
26752
  /* @__PURE__ */ jsx("svg", { className: "mt-0.5 h-4 w-4 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v4m0 4h.01M12 3a9 9 0 110 18 9 9 0 010-18z" }) }),
26699
26753
  title ? /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: title }) : /* @__PURE__ */ jsx("p", { className: "text-xs leading-5 text-[#B54708]", children: description })
@@ -26712,12 +26766,12 @@ const CoinleyPaymentInternal = ({
26712
26766
  setRefundRequestStatus(null);
26713
26767
  setRefundRequestMessage("");
26714
26768
  },
26715
- className: `relative flex min-h-[112px] flex-col items-start rounded-xl border p-3 text-left transition-colors ${selected ? "border-[#8B5CF6] bg-[#F4EEFF]" : "border-[#ECEEF2] bg-white hover:border-[#D7C5FF]"}`,
26769
+ className: `relative flex ${isMobile ? "min-h-[98px] p-2.5" : "min-h-[112px] p-3"} flex-col items-start rounded-xl border text-left transition-colors ${selected ? "border-[#8B5CF6] bg-[#F4EEFF]" : "border-[#ECEEF2] bg-white hover:border-[#D7C5FF]"}`,
26716
26770
  children: [
26717
26771
  selected && /* @__PURE__ */ jsx("span", { className: "absolute right-[-7px] top-[-9px] flex h-5 w-5 items-center justify-center rounded-full border border-[#8B5CF6] bg-white text-[#7042D2]", children: /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.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" }) }) }),
26718
- /* @__PURE__ */ jsx("div", { className: "mb-3 flex h-6 w-6 items-center justify-center text-[#111827]", children: icon }),
26772
+ /* @__PURE__ */ jsx("div", { className: `${isMobile ? "mb-2" : "mb-3"} flex h-6 w-6 items-center justify-center text-[#111827]`, children: icon }),
26719
26773
  /* @__PURE__ */ jsx("p", { className: "mb-1 text-sm font-semibold text-[#111827]", children: title }),
26720
- /* @__PURE__ */ jsx("p", { className: "text-xs leading-4 text-[#A3A5AC]", children: description })
26774
+ /* @__PURE__ */ jsx("p", { className: `${isMobile ? "text-[11px] leading-4" : "text-xs leading-4"} text-[#A3A5AC]`, children: description })
26721
26775
  ]
26722
26776
  }
26723
26777
  );
@@ -26745,13 +26799,13 @@ const CoinleyPaymentInternal = ({
26745
26799
  })
26746
26800
  ] })
26747
26801
  ] });
26748
- const renderRecoveryLoadingPanel = ({ title, description, detail }) => /* @__PURE__ */ jsxs("div", { className: "flex min-h-[292px] flex-col items-center justify-center px-3 py-4 text-center", children: [
26749
- /* @__PURE__ */ jsxs("div", { className: "relative mb-4 flex h-28 w-40 items-center justify-center", children: [
26802
+ const renderRecoveryLoadingPanel = ({ title, description, detail }) => /* @__PURE__ */ jsxs("div", { className: `flex ${isMobile ? "min-h-[230px] px-2 py-3" : "min-h-[292px] px-3 py-4"} flex-col items-center justify-center text-center`, children: [
26803
+ /* @__PURE__ */ jsxs("div", { className: `relative ${isMobile ? "mb-3 h-24 w-32" : "mb-4 h-28 w-40"} flex items-center justify-center`, children: [
26750
26804
  /* @__PURE__ */ jsx("div", { className: "absolute inset-x-5 bottom-1 h-4 rounded-full bg-[#7042D2]/10 blur-md" }),
26751
- /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className: "relative h-28 w-40 object-contain" })
26805
+ /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className: `relative ${isMobile ? "h-24 w-32" : "h-28 w-40"} object-contain` })
26752
26806
  ] }),
26753
- /* @__PURE__ */ jsx("h3", { className: "mb-2 text-lg font-semibold text-[#111827]", children: title }),
26754
- /* @__PURE__ */ jsx("p", { className: "mx-auto max-w-[330px] text-sm leading-5 text-[#8B8E98]", children: description }),
26807
+ /* @__PURE__ */ jsx("h3", { className: `${isMobile ? "mb-1.5 text-base" : "mb-2 text-lg"} font-semibold text-[#111827]`, children: title }),
26808
+ /* @__PURE__ */ jsx("p", { className: `mx-auto max-w-[330px] ${isMobile ? "text-xs leading-5" : "text-sm leading-5"} text-[#8B8E98]`, children: description }),
26755
26809
  detail && /* @__PURE__ */ jsxs("div", { className: "mt-5 w-full rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-3 text-left", children: [
26756
26810
  /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between text-xs", children: [
26757
26811
  /* @__PURE__ */ jsx("span", { className: "text-[#A3A5AC]", children: "Status" }),
@@ -26765,12 +26819,12 @@ const CoinleyPaymentInternal = ({
26765
26819
  description: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "offset" ? recoveryLoadingStatus.description : "We are checking the blockchain for your offset payment. This usually takes a few seconds.",
26766
26820
  detail: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "offset" ? recoveryLoadingStatus.detail : `Waiting for the remaining ${underpaymentOffsetAmountLabel} on ${underpaymentInfo.refundNetworkLabel || getOffsetSuccessNetworkName(selectedNetwork)}.`
26767
26821
  }) : /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
26768
- /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-start gap-3", children: [
26769
- /* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: (ccResult ? ccQrCode : depositQrCode) ? /* @__PURE__ */ jsx("img", { src: ccResult ? ccQrCode : depositQrCode, alt: "Deposit Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
26822
+ /* @__PURE__ */ jsxs("div", { className: `${isMobile ? "mb-4 gap-3" : "mb-5 gap-3"} flex items-start`, children: [
26823
+ /* @__PURE__ */ jsx("div", { className: `${isMobile ? "h-[82px] w-[82px]" : "h-[92px] w-[92px]"} flex-shrink-0 bg-white`, children: (ccResult ? ccQrCode : depositQrCode) ? /* @__PURE__ */ jsx("img", { src: ccResult ? ccQrCode : depositQrCode, alt: "Deposit Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
26770
26824
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 pt-1", children: [
26771
26825
  /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Same Wallet address" }),
26772
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-[58px] items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-2", children: [
26773
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-all text-sm leading-5 text-[#1F2430]", children: activeTransferDepositAddress }),
26826
+ /* @__PURE__ */ jsxs("div", { className: `flex ${isMobile ? "min-h-[54px] px-2.5" : "min-h-[58px] px-3"} items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] py-2`, children: [
26827
+ /* @__PURE__ */ jsx("span", { className: `min-w-0 flex-1 break-all ${isMobile ? "text-xs leading-4" : "text-sm leading-5"} text-[#1F2430]`, children: activeTransferDepositAddress }),
26774
26828
  /* @__PURE__ */ jsx(
26775
26829
  "button",
26776
26830
  {
@@ -26843,7 +26897,7 @@ const CoinleyPaymentInternal = ({
26843
26897
  const selectedLabel = selectedOption ? getLabel(selectedOption) : placeholder;
26844
26898
  const selectedIcon = selectedOption && getIcon ? getIcon(selectedOption) : null;
26845
26899
  const isOpen2 = openCheckoutDropdown === dropdownId && !disabled;
26846
- const dropdownListMaxHeight = maxVisibleItems * 40;
26900
+ const dropdownListMaxHeight = maxVisibleItems * (isMobile ? 36 : 40);
26847
26901
  const searchValue = checkoutDropdownSearch[dropdownId] || "";
26848
26902
  const normalizedSearch = searchValue.trim().toLowerCase();
26849
26903
  const filteredOptions = normalizedSearch ? options.filter((option) => {
@@ -26851,7 +26905,7 @@ const CoinleyPaymentInternal = ({
26851
26905
  const optionLabel = getLabel(option);
26852
26906
  return (optionLabel == null ? void 0 : optionLabel.toLowerCase().includes(normalizedSearch)) || ((_b = (_a2 = option == null ? void 0 : option.name) == null ? void 0 : _a2.toLowerCase) == null ? void 0 : _b.call(_a2).includes(normalizedSearch)) || ((_d = (_c = option == null ? void 0 : option.symbol) == null ? void 0 : _c.toLowerCase) == null ? void 0 : _d.call(_c).includes(normalizedSearch)) || ((_f = (_e = option == null ? void 0 : option.shortName) == null ? void 0 : _e.toLowerCase) == null ? void 0 : _f.call(_e).includes(normalizedSearch));
26853
26907
  }) : options;
26854
- return /* @__PURE__ */ jsxs("div", { className: `relative ${isOpen2 ? elevated ? "z-[120]" : "z-50" : "z-10"} ${compact ? "mb-3" : "mb-4"} text-left`, children: [
26908
+ return /* @__PURE__ */ jsxs("div", { className: `relative ${isOpen2 ? elevated ? "z-[120]" : "z-50" : "z-10"} ${isMobile ? compact ? "mb-2.5" : "mb-3" : compact ? "mb-3" : "mb-4"} text-left`, children: [
26855
26909
  /* @__PURE__ */ jsx("label", { className: "block text-xs text-[#1F2430] mb-2", children: label }),
26856
26910
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
26857
26911
  /* @__PURE__ */ jsxs(
@@ -26860,7 +26914,7 @@ const CoinleyPaymentInternal = ({
26860
26914
  type: "button",
26861
26915
  disabled,
26862
26916
  onClick: () => setOpenCheckoutDropdown(isOpen2 ? null : dropdownId),
26863
- className: "flex h-11 w-full items-center gap-2 rounded-xl border border-[#EEF0F4] bg-white px-4 pr-10 text-left text-sm text-[#1F2430] outline-none transition-colors focus:border-[#B49AF0] disabled:bg-[#FAFAFB] disabled:text-[#B5B7BE]",
26917
+ className: `flex ${isMobile ? "h-10 px-3 pr-9 text-[13px]" : "h-11 px-4 pr-10 text-sm"} w-full items-center gap-2 rounded-xl border border-[#EEF0F4] bg-white text-left text-[#1F2430] outline-none transition-colors focus:border-[#B49AF0] disabled:bg-[#FAFAFB] disabled:text-[#B5B7BE]`,
26864
26918
  children: [
26865
26919
  selectedIcon && /* @__PURE__ */ jsx(
26866
26920
  "img",
@@ -26877,7 +26931,7 @@ const CoinleyPaymentInternal = ({
26877
26931
  ]
26878
26932
  }
26879
26933
  ),
26880
- /* @__PURE__ */ jsx("svg", { className: "pointer-events-none absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-[#B5B7BE]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }),
26934
+ /* @__PURE__ */ jsx("svg", { className: `pointer-events-none absolute ${isMobile ? "right-3" : "right-4"} top-1/2 h-4 w-4 -translate-y-1/2 text-[#B5B7BE]`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }),
26881
26935
  isOpen2 && /* @__PURE__ */ jsxs("div", { className: `absolute left-0 right-0 top-[calc(100%+6px)] ${elevated ? "z-[130]" : "z-[60]"} rounded-xl border border-[#EEF0F4] bg-white p-1 shadow-[0_12px_30px_rgba(31,36,48,0.14)]`, children: [
26882
26936
  /* @__PURE__ */ jsx("div", { className: "p-1", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
26883
26937
  /* @__PURE__ */ jsx("svg", { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#B5B7BE]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-4.35-4.35m1.35-5.65a7 7 0 11-14 0 7 7 0 0114 0z" }) }),
@@ -26913,7 +26967,7 @@ const CoinleyPaymentInternal = ({
26913
26967
  [dropdownId]: ""
26914
26968
  }));
26915
26969
  },
26916
- className: `flex h-10 w-full items-center gap-2 rounded-lg px-3 text-left text-sm transition-colors ${isSelected ? "bg-purple-50 text-[#5B2EEA]" : "text-[#1F2430] hover:bg-[#F8F8F9]"}`,
26970
+ className: `flex ${isMobile ? "h-9 text-[13px]" : "h-10 text-sm"} w-full items-center gap-2 rounded-lg px-3 text-left transition-colors ${isSelected ? "bg-purple-50 text-[#5B2EEA]" : "text-[#1F2430] hover:bg-[#F8F8F9]"}`,
26917
26971
  children: [
26918
26972
  optionIcon && /* @__PURE__ */ jsx(
26919
26973
  "img",
@@ -27243,10 +27297,10 @@ const CoinleyPaymentInternal = ({
27243
27297
  /* @__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" })
27244
27298
  ] });
27245
27299
  const renderQrPaymentPanel = () => /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
27246
- /* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col gap-3 min-[380px]:flex-row min-[380px]:items-start", children: [
27247
- /* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: qrCodeDataUrl ? /* @__PURE__ */ jsx("img", { src: qrCodeDataUrl, alt: "Payment QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
27300
+ /* @__PURE__ */ jsxs("div", { className: `${isMobile ? "mb-3" : "mb-4"} flex flex-col gap-3 min-[380px]:flex-row min-[380px]:items-start`, children: [
27301
+ /* @__PURE__ */ jsx("div", { className: `${isMobile ? "h-[82px] w-[82px]" : "h-[92px] w-[92px]"} flex-shrink-0 bg-white`, children: qrCodeDataUrl ? /* @__PURE__ */ jsx("img", { src: qrCodeDataUrl, alt: "Payment QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
27248
27302
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
27249
- /* @__PURE__ */ jsx("p", { className: "mb-2 text-base font-semibold text-[#111827]", children: "Instructions" }),
27303
+ /* @__PURE__ */ jsx("p", { className: `${isMobile ? "mb-1 text-sm" : "mb-2 text-base"} font-semibold text-[#111827]`, children: "Instructions" }),
27250
27304
  /* @__PURE__ */ jsxs("ol", { className: "list-inside list-decimal space-y-1 text-xs leading-5 text-[#111827]", children: [
27251
27305
  /* @__PURE__ */ jsx("li", { children: "Scan QR code with your phone camera" }),
27252
27306
  /* @__PURE__ */ jsx("li", { children: "The payment page will open inside your wallet app" }),
@@ -27362,7 +27416,7 @@ const CoinleyPaymentInternal = ({
27362
27416
  type: type2,
27363
27417
  onClick,
27364
27418
  disabled,
27365
- className: `h-11 w-full rounded-xl px-4 text-sm font-semibold transition-colors disabled:cursor-not-allowed ${variant === "secondary" ? "border border-[#7042D2] bg-white text-[#7042D2] hover:bg-purple-50 disabled:opacity-60" : "bg-[#7042D2] text-white hover:bg-[#5b34b1] disabled:bg-[#B59AE9] disabled:text-white"}`,
27419
+ className: `${isMobile ? "h-10 text-[13px]" : "h-11 text-sm"} w-full rounded-xl px-4 font-semibold transition-colors disabled:cursor-not-allowed ${variant === "secondary" ? "border border-[#7042D2] bg-white text-[#7042D2] hover:bg-purple-50 disabled:opacity-60" : "bg-[#7042D2] text-white hover:bg-[#5b34b1] disabled:bg-[#B59AE9] disabled:text-white"}`,
27366
27420
  children: label
27367
27421
  }
27368
27422
  );
@@ -27512,17 +27566,17 @@ const CoinleyPaymentInternal = ({
27512
27566
  };
27513
27567
  const renderCheckoutFooter = () => {
27514
27568
  const checkoutAction = renderCheckoutAction();
27515
- return /* @__PURE__ */ jsxs("div", { className: `mt-auto shrink-0 ${isTightWalletView ? "pt-2 pb-0" : isCompactCheckoutView ? "pt-3 pb-0" : "pt-4 pb-1"} text-center`, children: [
27516
- /* @__PURE__ */ jsx("div", { className: checkoutAction ? "mb-3 min-h-[44px]" : "mb-3 min-h-[44px]", children: checkoutAction }),
27517
- /* @__PURE__ */ jsxs("div", { className: `flex items-center justify-center gap-2 ${isTightWalletView ? "text-xs" : "text-sm"} text-[#1F2430]`, children: [
27518
- /* @__PURE__ */ jsxs("svg", { className: `${isTightWalletView ? "h-3.5 w-3.5" : "h-4 w-4"}`, fill: "none", stroke: "currentColor", strokeWidth: "1.8", viewBox: "0 0 24 24", children: [
27569
+ return /* @__PURE__ */ jsxs("div", { className: `mt-auto shrink-0 ${isMobile ? isTightWalletView ? "pt-2 pb-0" : "pt-3 pb-0" : isTightWalletView ? "pt-2 pb-0" : isCompactCheckoutView ? "pt-3 pb-0" : "pt-4 pb-1"} text-center`, children: [
27570
+ /* @__PURE__ */ jsx("div", { className: checkoutAction ? `${isMobile ? "mb-2 min-h-[40px]" : "mb-3 min-h-[44px]"}` : `${isMobile ? "mb-2 min-h-[40px]" : "mb-3 min-h-[44px]"}`, children: checkoutAction }),
27571
+ /* @__PURE__ */ jsxs("div", { className: `flex items-center justify-center gap-1.5 ${isMobile || isTightWalletView ? "text-xs" : "text-sm"} text-[#1F2430]`, children: [
27572
+ /* @__PURE__ */ jsxs("svg", { className: `${isMobile || isTightWalletView ? "h-3.5 w-3.5" : "h-4 w-4"}`, fill: "none", stroke: "currentColor", strokeWidth: "1.8", viewBox: "0 0 24 24", children: [
27519
27573
  /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
27520
27574
  /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 7v5l3 2" })
27521
27575
  ] }),
27522
27576
  /* @__PURE__ */ jsx("span", { children: "Time remaining for this payment" }),
27523
27577
  /* @__PURE__ */ jsx("span", { className: `tabular-nums ${timeRemaining <= 5 * 60 * 1e3 ? "text-red-500" : "text-[#5B2EEA]"}`, children: formatCountdown(timeRemaining) })
27524
27578
  ] }),
27525
- /* @__PURE__ */ jsx("p", { className: `${isTightWalletView ? "mt-1" : isCompactCheckoutView ? "mt-2" : "mt-3"} text-xs text-[#A9ABB2]`, children: "Powered by Stablezact" })
27579
+ /* @__PURE__ */ jsx("p", { className: `${isMobile || isTightWalletView ? "mt-1" : isCompactCheckoutView ? "mt-2" : "mt-3"} text-xs text-[#A9ABB2]`, children: "Powered by Stablezact" })
27526
27580
  ] });
27527
27581
  };
27528
27582
  const renderTabContent = () => {
@@ -27835,11 +27889,11 @@ const CoinleyPaymentInternal = ({
27835
27889
  !isCrossChainTransferSetupView && !ccResult && !(paymentData == null ? void 0 : paymentData.depositAddress) && renderTransferSetupPanel(),
27836
27890
  !ccResult && (paymentData == null ? void 0 : paymentData.depositAddress) && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
27837
27891
  !underpaymentInfo && /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-4", children: [
27838
- /* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: depositQrCode ? /* @__PURE__ */ jsx("img", { src: depositQrCode, alt: "Deposit Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
27892
+ /* @__PURE__ */ jsx("div", { className: `${isMobile ? "h-[82px] w-[82px]" : "h-[92px] w-[92px]"} flex-shrink-0 bg-white`, children: depositQrCode ? /* @__PURE__ */ jsx("img", { src: depositQrCode, alt: "Deposit Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
27839
27893
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
27840
27894
  /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Wallet address" }),
27841
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-[60px] items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-2", children: [
27842
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-all text-sm leading-5 text-[#1F2430]", children: paymentData.depositAddress }),
27895
+ /* @__PURE__ */ jsxs("div", { className: `flex ${isMobile ? "min-h-[54px] px-2.5" : "min-h-[60px] px-3"} items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] py-2`, children: [
27896
+ /* @__PURE__ */ jsx("span", { className: `min-w-0 flex-1 break-all ${isMobile ? "text-xs leading-4" : "text-sm leading-5"} text-[#1F2430]`, children: paymentData.depositAddress }),
27843
27897
  /* @__PURE__ */ jsx(
27844
27898
  "button",
27845
27899
  {
@@ -27863,11 +27917,11 @@ const CoinleyPaymentInternal = ({
27863
27917
  ] }),
27864
27918
  ccResult && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
27865
27919
  !underpaymentInfo && /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-4", children: [
27866
- /* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: ccQrCode ? /* @__PURE__ */ jsx("img", { src: ccQrCode, alt: "Payment Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
27920
+ /* @__PURE__ */ jsx("div", { className: `${isMobile ? "h-[82px] w-[82px]" : "h-[92px] w-[92px]"} flex-shrink-0 bg-white`, children: ccQrCode ? /* @__PURE__ */ jsx("img", { src: ccQrCode, alt: "Payment Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
27867
27921
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
27868
27922
  /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Wallet address" }),
27869
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-[60px] items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-2", children: [
27870
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-all text-sm leading-5 text-[#1F2430]", children: ccResult.relayDepositAddress }),
27923
+ /* @__PURE__ */ jsxs("div", { className: `flex ${isMobile ? "min-h-[54px] px-2.5" : "min-h-[60px] px-3"} items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] py-2`, children: [
27924
+ /* @__PURE__ */ jsx("span", { className: `min-w-0 flex-1 break-all ${isMobile ? "text-xs leading-4" : "text-sm leading-5"} text-[#1F2430]`, children: ccResult.relayDepositAddress }),
27871
27925
  /* @__PURE__ */ jsx(
27872
27926
  "button",
27873
27927
  {
@@ -28000,14 +28054,14 @@ const CoinleyPaymentInternal = ({
28000
28054
  ].includes(openCheckoutDropdown);
28001
28055
  return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
28002
28056
  /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
28003
- /* @__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: [
28057
+ /* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-x-0 bottom-0 flex items-end justify-center" : "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 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: [
28004
28058
  !isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [
28005
28059
  /* @__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` }),
28006
28060
  /* @__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` })
28007
28061
  ] }),
28008
28062
  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" }) }),
28009
- /* @__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: [
28010
- /* @__PURE__ */ jsxs("div", { className: `${isTightWalletView ? "mb-3" : "mb-5"} flex items-center justify-between`, children: [
28063
+ /* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-1 flex-col px-4 ${isMobile ? isTightWalletView ? "pb-3 pt-3" : "pb-4 pt-3" : isTightWalletView ? "pb-2 pt-3" : "pb-4 pt-4"}`, children: [
28064
+ /* @__PURE__ */ jsxs("div", { className: `${isMobile ? isTightWalletView ? "mb-2" : "mb-4" : isTightWalletView ? "mb-3" : "mb-5"} flex items-center justify-between`, children: [
28011
28065
  isTransferAddressGenerated || isWalletReadyForPayment || isQrPaymentActiveView || isWalletBackHeaderView || isWalletTokenSelectionView ? /* @__PURE__ */ jsx(
28012
28066
  "button",
28013
28067
  {
@@ -28068,4 +28122,4 @@ export {
28068
28122
  chainTransports as c,
28069
28123
  isFeatureEnabled as i
28070
28124
  };
28071
- //# sourceMappingURL=CoinleyPayment-BgreroDe.js.map
28125
+ //# sourceMappingURL=CoinleyPayment-BFkZ0Fq5.js.map
@@ -1,4 +1,4 @@
1
- import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BgreroDe.js";
1
+ import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BFkZ0Fq5.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-Bzcdqksa.js.map
116
+ //# sourceMappingURL=appKitEVM-BC0nAR77.js.map
@@ -1,4 +1,4 @@
1
- import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BgreroDe.js";
1
+ import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BFkZ0Fq5.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-Bc3C3YDl.js.map
246
+ //# sourceMappingURL=appKitSolana-B1EqivHA.js.map