coinley-pay 0.39.0 → 0.41.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.
- package/dist/{CoinleyPayment-VQ3D1nhQ.js → CoinleyPayment-BzyfVl7w.js} +159 -13
- package/dist/{appKitEVM-D7dsllG3.js → appKitEVM-BX6_ktkV.js} +2 -2
- package/dist/{appKitSolana-BRa7mnYF.js → appKitSolana-B-Mnxul0.js} +2 -2
- package/dist/coinley-vanilla.min.js +164 -164
- package/dist/{index-DKm9NRCD.js → index-BiZ-U4t_.js} +3 -3
- package/dist/{index-QhVPZTuy.js → index-iRzL6vvA.js} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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-BiZ-U4t_.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";
|
|
@@ -21150,7 +21150,7 @@ const WalletSelector = ({
|
|
|
21150
21150
|
try {
|
|
21151
21151
|
setAppKitError(null);
|
|
21152
21152
|
setWalletConnectAddress(solanaAccountState.address);
|
|
21153
|
-
const { createWalletConnectAdapter } = await import("./appKitSolana-
|
|
21153
|
+
const { createWalletConnectAdapter } = await import("./appKitSolana-B-Mnxul0.js");
|
|
21154
21154
|
const adapter = createWalletConnectAdapter(solanaAccountState.address);
|
|
21155
21155
|
await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
|
|
21156
21156
|
console.log("✅ WalletConnect synced with SDK");
|
|
@@ -21255,7 +21255,7 @@ const WalletSelector = ({
|
|
|
21255
21255
|
setAppKitLoading(true);
|
|
21256
21256
|
setAppKitError(null);
|
|
21257
21257
|
try {
|
|
21258
|
-
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-
|
|
21258
|
+
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-BX6_ktkV.js");
|
|
21259
21259
|
await initializeAppKitEVM(wagmiConfig);
|
|
21260
21260
|
await openAppKitModal();
|
|
21261
21261
|
} catch (error) {
|
|
@@ -21275,7 +21275,7 @@ const WalletSelector = ({
|
|
|
21275
21275
|
setAppKitError(null);
|
|
21276
21276
|
try {
|
|
21277
21277
|
console.log("📦 Loading AppKit Solana module...");
|
|
21278
|
-
const { initializeAppKitSolana } = await import("./appKitSolana-
|
|
21278
|
+
const { initializeAppKitSolana } = await import("./appKitSolana-B-Mnxul0.js");
|
|
21279
21279
|
console.log("✅ Module loaded, initializing...");
|
|
21280
21280
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
21281
21281
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -23377,6 +23377,7 @@ const CoinleyPaymentInternal = ({
|
|
|
23377
23377
|
const [refundRequestSubmitted, setRefundRequestSubmitted] = useState(false);
|
|
23378
23378
|
const [refundRequestStatus, setRefundRequestStatus] = useState(null);
|
|
23379
23379
|
const [refundRequestMessage, setRefundRequestMessage] = useState("");
|
|
23380
|
+
const [offsetSuccessDetails, setOffsetSuccessDetails] = useState(null);
|
|
23380
23381
|
const manualCheckTimeout = useRef(null);
|
|
23381
23382
|
const [copiedField, setCopiedField] = useState(null);
|
|
23382
23383
|
const [expirationTime, setExpirationTime] = useState(null);
|
|
@@ -23537,6 +23538,53 @@ const CoinleyPaymentInternal = ({
|
|
|
23537
23538
|
sweepTxHash: (payment == null ? void 0 : payment.sweepTxHash) ?? (prev == null ? void 0 : prev.sweepTxHash)
|
|
23538
23539
|
}));
|
|
23539
23540
|
}, [resolvePaymentTransactionHash, setPaymentData]);
|
|
23541
|
+
const getExplorerDetails = useCallback((network) => {
|
|
23542
|
+
const key = String((network == null ? void 0 : network.shortName) || (network == null ? void 0 : network.type) || (network == null ? void 0 : network.id) || (network == null ? void 0 : network.name) || "").toLowerCase();
|
|
23543
|
+
const chainId = Number(network == null ? void 0 : network.chainId);
|
|
23544
|
+
const explorers = {
|
|
23545
|
+
ethereum: { name: "Etherscan", url: "https://etherscan.io" },
|
|
23546
|
+
eth: { name: "Etherscan", url: "https://etherscan.io" },
|
|
23547
|
+
bsc: { name: "BscScan", url: "https://bscscan.com" },
|
|
23548
|
+
"bnb chain": { name: "BscScan", url: "https://bscscan.com" },
|
|
23549
|
+
polygon: { name: "PolygonScan", url: "https://polygonscan.com" },
|
|
23550
|
+
base: { name: "BaseScan", url: "https://basescan.org" },
|
|
23551
|
+
arbitrum: { name: "Arbiscan", url: "https://arbiscan.io" },
|
|
23552
|
+
optimism: { name: "Optimistic Etherscan", url: "https://optimistic.etherscan.io" },
|
|
23553
|
+
avalanche: { name: "SnowTrace", url: "https://snowtrace.io" },
|
|
23554
|
+
linea: { name: "LineaScan", url: "https://lineascan.build" },
|
|
23555
|
+
scroll: { name: "ScrollScan", url: "https://scrollscan.com" },
|
|
23556
|
+
unichain: { name: "Uniscan", url: "https://uniscan.xyz" },
|
|
23557
|
+
monad: { name: "Monad Explorer", url: "https://testnet.monadexplorer.com" }
|
|
23558
|
+
};
|
|
23559
|
+
const chainExplorers = {
|
|
23560
|
+
1: explorers.ethereum,
|
|
23561
|
+
56: explorers.bsc,
|
|
23562
|
+
137: explorers.polygon,
|
|
23563
|
+
8453: explorers.base,
|
|
23564
|
+
42161: explorers.arbitrum,
|
|
23565
|
+
10: explorers.optimism,
|
|
23566
|
+
43114: explorers.avalanche,
|
|
23567
|
+
59144: explorers.linea,
|
|
23568
|
+
534352: explorers.scroll,
|
|
23569
|
+
130: explorers.unichain,
|
|
23570
|
+
143: explorers.monad
|
|
23571
|
+
};
|
|
23572
|
+
return chainExplorers[chainId] || explorers[key] || { name: "Explorer", url: null };
|
|
23573
|
+
}, []);
|
|
23574
|
+
const getOffsetSuccessNetworkName = useCallback((network) => (network == null ? void 0 : network.displayName) || (network == null ? void 0 : network.name) || ((network == null ? void 0 : network.shortName) ? network.shortName.toUpperCase() : "Network"), []);
|
|
23575
|
+
const captureOffsetSuccessDetails = useCallback((payment, txHash) => {
|
|
23576
|
+
if (!(underpaymentInfo && underpaymentChoice === "offset")) return;
|
|
23577
|
+
const explorer = getExplorerDetails(selectedNetwork);
|
|
23578
|
+
setOffsetSuccessDetails({
|
|
23579
|
+
amount: underpaymentInfo.shortfallAmount || (payment == null ? void 0 : payment.amountRemaining) || (payment == null ? void 0 : payment.amount) || (config == null ? void 0 : config.amount) || 0,
|
|
23580
|
+
merchantName: (config == null ? void 0 : config.merchantName) || "Merchant",
|
|
23581
|
+
networkName: getOffsetSuccessNetworkName(selectedNetwork),
|
|
23582
|
+
tokenSymbol: underpaymentInfo.tokenSymbol || (selectedToken == null ? void 0 : selectedToken.symbol) || (payment == null ? void 0 : payment.currency) || "Token",
|
|
23583
|
+
transactionHash: txHash || resolvePaymentTransactionHash(payment),
|
|
23584
|
+
explorerName: explorer.name,
|
|
23585
|
+
explorerUrl: explorer.url && (txHash || resolvePaymentTransactionHash(payment)) ? `${explorer.url}/tx/${txHash || resolvePaymentTransactionHash(payment)}` : null
|
|
23586
|
+
});
|
|
23587
|
+
}, [config == null ? void 0 : config.amount, config == null ? void 0 : config.merchantName, getExplorerDetails, getOffsetSuccessNetworkName, resolvePaymentTransactionHash, selectedNetwork, selectedToken == null ? void 0 : selectedToken.symbol, underpaymentChoice, underpaymentInfo]);
|
|
23540
23588
|
const getUnderpaymentRecoveryStorageKey = useCallback((paymentId = activeTransferPaymentId) => {
|
|
23541
23589
|
return paymentId ? `${UNDERPAYMENT_RECOVERY_STORAGE_PREFIX}${paymentId}` : null;
|
|
23542
23590
|
}, [activeTransferPaymentId]);
|
|
@@ -23683,6 +23731,9 @@ const CoinleyPaymentInternal = ({
|
|
|
23683
23731
|
setCcManualCheckStatus(null);
|
|
23684
23732
|
clearUnderpaymentRecovery(paymentId || activeTransferPaymentId);
|
|
23685
23733
|
}, [activeTransferPaymentId, clearUnderpaymentRecovery]);
|
|
23734
|
+
useEffect(() => {
|
|
23735
|
+
setOffsetSuccessDetails(null);
|
|
23736
|
+
}, [paymentData == null ? void 0 : paymentData.id]);
|
|
23686
23737
|
const selectedNetworkIsSolana = (selectedNetwork == null ? void 0 : selectedNetwork.chainType) === "solana" || (selectedNetwork == null ? void 0 : selectedNetwork.shortName) === "solana";
|
|
23687
23738
|
const sourceNeedsMerchantBridge = Boolean(
|
|
23688
23739
|
selectedNetwork && !selectedNetworkIsSolana && !isMerchantReceiveNetwork(selectedNetwork)
|
|
@@ -24148,6 +24199,7 @@ const CoinleyPaymentInternal = ({
|
|
|
24148
24199
|
const txHash = resolvePaymentTransactionHash(statusResult.payment);
|
|
24149
24200
|
if ((status === "completed" || status === "swept") && txHash) {
|
|
24150
24201
|
clearInterval(pollInterval);
|
|
24202
|
+
captureOffsetSuccessDetails(statusResult.payment, txHash);
|
|
24151
24203
|
clearUnderpaymentRecovery(paymentData.id);
|
|
24152
24204
|
setProcessingStatusMessage("");
|
|
24153
24205
|
persistSuccessfulPaymentHash(statusResult.payment, txHash);
|
|
@@ -24209,7 +24261,7 @@ const CoinleyPaymentInternal = ({
|
|
|
24209
24261
|
}
|
|
24210
24262
|
}, 5e3);
|
|
24211
24263
|
return () => clearInterval(pollInterval);
|
|
24212
|
-
}, [currentStep, paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, selectedNetwork, selectedToken, onSuccess, activateUnderpaymentFlow, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash]);
|
|
24264
|
+
}, [currentStep, paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, selectedNetwork, selectedToken, onSuccess, activateUnderpaymentFlow, captureOffsetSuccessDetails, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash]);
|
|
24213
24265
|
useEffect(() => {
|
|
24214
24266
|
const shouldPoll = (paymentData == null ? void 0 : paymentData.id) && (activeTab === PAYMENT_TABS.QR || activeTab === PAYMENT_TABS.TRANSFER) && currentStep === PAYMENT_STEPS.CONFIRM && !verifyingPayment && paymentType !== PAYMENT_TYPES.DEPOSIT && !(paymentData == null ? void 0 : paymentData.isDepositPayment) && !(paymentData == null ? void 0 : paymentData.depositAddress);
|
|
24215
24267
|
if (!shouldPoll) {
|
|
@@ -25934,6 +25986,7 @@ const CoinleyPaymentInternal = ({
|
|
|
25934
25986
|
if ((status === "completed" || status === "swept") && txHash) {
|
|
25935
25987
|
console.log("✅ Auto-detected: Deposit payment completed!");
|
|
25936
25988
|
clearInterval(pollInterval);
|
|
25989
|
+
captureOffsetSuccessDetails(statusResult.payment, txHash);
|
|
25937
25990
|
clearUnderpaymentRecovery(paymentData.id);
|
|
25938
25991
|
persistSuccessfulPaymentHash(statusResult.payment, txHash);
|
|
25939
25992
|
setCurrentStep(PAYMENT_STEPS.SUCCESS);
|
|
@@ -25973,7 +26026,7 @@ const CoinleyPaymentInternal = ({
|
|
|
25973
26026
|
console.log("🛑 Stopping deposit auto-detection polling");
|
|
25974
26027
|
clearInterval(pollInterval);
|
|
25975
26028
|
};
|
|
25976
|
-
}, [paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, paymentType, currentStep, verifyingPayment, expirationTime == null ? void 0 : expirationTime.expired, selectedNetwork, selectedToken, onSuccess, paymentFlow.api, activateUnderpaymentFlow, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash]);
|
|
26029
|
+
}, [paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, paymentType, currentStep, verifyingPayment, expirationTime == null ? void 0 : expirationTime.expired, selectedNetwork, selectedToken, onSuccess, paymentFlow.api, activateUnderpaymentFlow, captureOffsetSuccessDetails, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash]);
|
|
25977
26030
|
useEffect(() => {
|
|
25978
26031
|
return () => {
|
|
25979
26032
|
if (manualCheckTimeout.current) {
|
|
@@ -26043,16 +26096,20 @@ const CoinleyPaymentInternal = ({
|
|
|
26043
26096
|
const refundStatus = ((_a2 = result == null ? void 0 : result.payment) == null ? void 0 : _a2.refundStatus) || "pending";
|
|
26044
26097
|
setRefundRequestSubmitted(true);
|
|
26045
26098
|
setRefundRequestStatus(refundStatus === "refunded" ? "refunded" : "pending");
|
|
26046
|
-
|
|
26047
|
-
|
|
26048
|
-
|
|
26099
|
+
if (refundStatus === "refunded") {
|
|
26100
|
+
setRefundRequestMessage("Refund sent successfully.");
|
|
26101
|
+
} else {
|
|
26102
|
+
const refundMessage = "Refund request received. We will process it automatically.";
|
|
26103
|
+
setRefundRequestMessage("");
|
|
26104
|
+
showTransferNoticeModal(refundMessage, "Refund request received");
|
|
26105
|
+
}
|
|
26049
26106
|
} catch (error2) {
|
|
26050
26107
|
console.warn("[RefundRequest] Error:", error2.message);
|
|
26051
26108
|
setRefundRequestSubmitted(false);
|
|
26052
26109
|
setRefundRequestStatus("error");
|
|
26053
26110
|
setRefundRequestMessage(error2.message || "Failed to submit refund request. Please try again.");
|
|
26054
26111
|
}
|
|
26055
|
-
}, [activeTransferPaymentId, ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, clearUnderpaymentRecovery, config, refundAddress, refundRequestStatus, paymentFlow.api, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, underpaymentInfo]);
|
|
26112
|
+
}, [activeTransferPaymentId, ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, clearUnderpaymentRecovery, config, refundAddress, refundRequestStatus, paymentFlow.api, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, showTransferNoticeModal, underpaymentInfo]);
|
|
26056
26113
|
const handleDepositManualCheck = useCallback(async () => {
|
|
26057
26114
|
if (manualCheckStatus === "checking" || !(paymentData == null ? void 0 : paymentData.id)) return;
|
|
26058
26115
|
setManualCheckStatus("checking");
|
|
@@ -26063,6 +26120,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26063
26120
|
const txHash = resolvePaymentTransactionHash(statusResult.payment);
|
|
26064
26121
|
if ((status === "completed" || status === "swept") && txHash) {
|
|
26065
26122
|
setManualCheckStatus(null);
|
|
26123
|
+
captureOffsetSuccessDetails(statusResult.payment, txHash);
|
|
26066
26124
|
clearUnderpaymentRecovery(paymentData.id);
|
|
26067
26125
|
persistSuccessfulPaymentHash(statusResult.payment, txHash);
|
|
26068
26126
|
setCurrentStep(PAYMENT_STEPS.SUCCESS);
|
|
@@ -26109,7 +26167,11 @@ const CoinleyPaymentInternal = ({
|
|
|
26109
26167
|
setManualCheckStatus(null);
|
|
26110
26168
|
}, 1e4);
|
|
26111
26169
|
}
|
|
26112
|
-
}, [manualCheckStatus, paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, paymentFlow.api, config == null ? void 0 : config.amount, selectedNetwork, selectedToken, onSuccess, activateUnderpaymentFlow, activateUnderpaymentFromDepositBalance, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash, showTransferNoticeModal]);
|
|
26170
|
+
}, [manualCheckStatus, paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, paymentFlow.api, config == null ? void 0 : config.amount, selectedNetwork, selectedToken, onSuccess, activateUnderpaymentFlow, activateUnderpaymentFromDepositBalance, captureOffsetSuccessDetails, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash, showTransferNoticeModal]);
|
|
26171
|
+
const truncateTransactionId = (hash) => {
|
|
26172
|
+
if (!hash) return "";
|
|
26173
|
+
return `${hash.slice(0, 7)}...${hash.slice(-8)}`;
|
|
26174
|
+
};
|
|
26113
26175
|
if (!isOpen) return null;
|
|
26114
26176
|
if (currentStep === PAYMENT_STEPS.PROCESSING) {
|
|
26115
26177
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
@@ -26153,6 +26215,90 @@ const CoinleyPaymentInternal = ({
|
|
|
26153
26215
|
] });
|
|
26154
26216
|
}
|
|
26155
26217
|
if (currentStep === PAYMENT_STEPS.SUCCESS) {
|
|
26218
|
+
if (offsetSuccessDetails) {
|
|
26219
|
+
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
26220
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
|
|
26221
|
+
/* @__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: [
|
|
26222
|
+
/* @__PURE__ */ jsx(
|
|
26223
|
+
"button",
|
|
26224
|
+
{
|
|
26225
|
+
type: "button",
|
|
26226
|
+
onClick: onClose,
|
|
26227
|
+
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",
|
|
26228
|
+
"aria-label": "Close payment modal",
|
|
26229
|
+
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" }) })
|
|
26230
|
+
}
|
|
26231
|
+
),
|
|
26232
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col pt-[68px]", children: [
|
|
26233
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-9 text-center", children: [
|
|
26234
|
+
/* @__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" }) }) }) }),
|
|
26235
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-medium text-black", children: "Offset Successful" }),
|
|
26236
|
+
/* @__PURE__ */ jsxs("p", { className: "text-base text-[#A9ABB2]", children: [
|
|
26237
|
+
/* @__PURE__ */ jsxs("span", { className: "font-semibold text-black", children: [
|
|
26238
|
+
"$",
|
|
26239
|
+
formatAmount(offsetSuccessDetails.amount || 0)
|
|
26240
|
+
] }),
|
|
26241
|
+
" ",
|
|
26242
|
+
"sent to ",
|
|
26243
|
+
offsetSuccessDetails.merchantName
|
|
26244
|
+
] })
|
|
26245
|
+
] }),
|
|
26246
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-9 space-y-0", children: [
|
|
26247
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
26248
|
+
/* @__PURE__ */ jsx("p", { className: "mb-1.5 text-xs text-[#4B5563]", children: "Transaction ID" }),
|
|
26249
|
+
/* @__PURE__ */ jsxs("div", { className: "flex h-11 items-center justify-between rounded-lg border border-[#EEF0F4] bg-[#FAFAFB] px-3", children: [
|
|
26250
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-black", children: truncateTransactionId(offsetSuccessDetails.transactionHash) }),
|
|
26251
|
+
/* @__PURE__ */ jsx(
|
|
26252
|
+
"button",
|
|
26253
|
+
{
|
|
26254
|
+
type: "button",
|
|
26255
|
+
onClick: () => copyToClipboard(offsetSuccessDetails.transactionHash, "offsetSuccessTx"),
|
|
26256
|
+
className: "ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#111827] transition-colors hover:bg-gray-100",
|
|
26257
|
+
"aria-label": "Copy transaction ID",
|
|
26258
|
+
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: [
|
|
26259
|
+
/* @__PURE__ */ jsx("rect", { x: "8", y: "7", width: "10", height: "13", rx: "2", strokeWidth: "1.7" }),
|
|
26260
|
+
/* @__PURE__ */ jsx("path", { d: "M6 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v1", strokeWidth: "1.7", strokeLinecap: "round" })
|
|
26261
|
+
] })
|
|
26262
|
+
}
|
|
26263
|
+
)
|
|
26264
|
+
] })
|
|
26265
|
+
] }),
|
|
26266
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[#EEF0F4] py-3", children: [
|
|
26267
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Network" }),
|
|
26268
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.networkName })
|
|
26269
|
+
] }),
|
|
26270
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-3", children: [
|
|
26271
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-[#A9ABB2]", children: "Token" }),
|
|
26272
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-black", children: offsetSuccessDetails.tokenSymbol })
|
|
26273
|
+
] }),
|
|
26274
|
+
offsetSuccessDetails.explorerUrl && /* @__PURE__ */ jsxs(
|
|
26275
|
+
"a",
|
|
26276
|
+
{
|
|
26277
|
+
href: offsetSuccessDetails.explorerUrl,
|
|
26278
|
+
target: "_blank",
|
|
26279
|
+
rel: "noopener noreferrer",
|
|
26280
|
+
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]",
|
|
26281
|
+
children: [
|
|
26282
|
+
"View on ",
|
|
26283
|
+
offsetSuccessDetails.explorerName,
|
|
26284
|
+
/* @__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" }) })
|
|
26285
|
+
]
|
|
26286
|
+
}
|
|
26287
|
+
)
|
|
26288
|
+
] }),
|
|
26289
|
+
/* @__PURE__ */ jsx(
|
|
26290
|
+
"button",
|
|
26291
|
+
{
|
|
26292
|
+
type: "button",
|
|
26293
|
+
onClick: onClose,
|
|
26294
|
+
className: "mt-auto h-12 w-full rounded-lg bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
|
|
26295
|
+
children: "Close"
|
|
26296
|
+
}
|
|
26297
|
+
)
|
|
26298
|
+
] })
|
|
26299
|
+
] }) })
|
|
26300
|
+
] });
|
|
26301
|
+
}
|
|
26156
26302
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
26157
26303
|
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
|
|
26158
26304
|
/* @__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(
|
|
@@ -26275,7 +26421,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26275
26421
|
"Amount received is less than expected",
|
|
26276
26422
|
`We received $${formatAmount(underpaymentInfo.receivedAmount || 0)} but expected $${formatAmount(underpaymentInfo.expectedAmount || paymentAmount || 0)}. Your transaction is on hold, please choose how to proceed.`
|
|
26277
26423
|
),
|
|
26278
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-5 grid grid-cols-
|
|
26424
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-5 grid grid-cols-2 gap-2", children: [
|
|
26279
26425
|
renderUnderpaymentOptionCard({
|
|
26280
26426
|
choice: "offset",
|
|
26281
26427
|
title: "Send offset",
|
|
@@ -27580,4 +27726,4 @@ export {
|
|
|
27580
27726
|
isFeatureEnabled as i,
|
|
27581
27727
|
logo as l
|
|
27582
27728
|
};
|
|
27583
|
-
//# sourceMappingURL=CoinleyPayment-
|
|
27729
|
+
//# sourceMappingURL=CoinleyPayment-BzyfVl7w.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID, l as logo } from "./CoinleyPayment-
|
|
1
|
+
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID, l as logo } from "./CoinleyPayment-BzyfVl7w.js";
|
|
2
2
|
let appKitInstance = null;
|
|
3
3
|
let isInitializing = false;
|
|
4
4
|
let initializationPromise = null;
|
|
@@ -112,4 +112,4 @@ export {
|
|
|
112
112
|
initializeAppKitEVM,
|
|
113
113
|
openAppKitModal
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=appKitEVM-
|
|
115
|
+
//# sourceMappingURL=appKitEVM-BX6_ktkV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FEATURES, l as logo, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-
|
|
1
|
+
import { F as FEATURES, l as logo, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BzyfVl7w.js";
|
|
2
2
|
let appKitInstance = null;
|
|
3
3
|
let isInitializing = false;
|
|
4
4
|
let initializationPromise = null;
|
|
@@ -242,4 +242,4 @@ export {
|
|
|
242
242
|
disconnectWalletConnect,
|
|
243
243
|
initializeAppKitSolana
|
|
244
244
|
};
|
|
245
|
-
//# sourceMappingURL=appKitSolana-
|
|
245
|
+
//# sourceMappingURL=appKitSolana-B-Mnxul0.js.map
|