coinley-pay 0.37.0 → 0.39.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-CckYt7S9.js → CoinleyPayment-VQ3D1nhQ.js} +122 -17
- package/dist/{appKitEVM-BCaK3hpo.js → appKitEVM-D7dsllG3.js} +2 -2
- package/dist/{appKitSolana-CHe_HukM.js → appKitSolana-BRa7mnYF.js} +2 -2
- package/dist/coinley-vanilla.min.js +1 -1
- package/dist/{index-CIjLjC1o.js → index-DKm9NRCD.js} +3 -3
- package/dist/{index-DfmVlOJ4.js → index-QhVPZTuy.js} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- 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-DKm9NRCD.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-BRa7mnYF.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-D7dsllG3.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-BRa7mnYF.js");
|
|
21279
21279
|
console.log("✅ Module loaded, initializing...");
|
|
21280
21280
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
21281
21281
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -23345,6 +23345,7 @@ const CoinleyPaymentInternal = ({
|
|
|
23345
23345
|
const [ccError, setCcError] = useState(null);
|
|
23346
23346
|
const [ccGenerating, setCcGenerating] = useState(false);
|
|
23347
23347
|
const [ccManualCheckStatus, setCcManualCheckStatus] = useState("idle");
|
|
23348
|
+
const [transferNoticeModal, setTransferNoticeModal] = useState(null);
|
|
23348
23349
|
const ccSucceeded = useRef(false);
|
|
23349
23350
|
const ccStatusPollInFlight = useRef(false);
|
|
23350
23351
|
const [networkSearch, setNetworkSearch] = useState("");
|
|
@@ -23478,6 +23479,9 @@ const CoinleyPaymentInternal = ({
|
|
|
23478
23479
|
} = paymentFlow;
|
|
23479
23480
|
const activeTransferPaymentId = (paymentData == null ? void 0 : paymentData.id) || (ccResult == null ? void 0 : ccResult.id) || (ccResult == null ? void 0 : ccResult.paymentId);
|
|
23480
23481
|
const activeTransferDepositAddress = (paymentData == null ? void 0 : paymentData.depositAddress) || (ccResult == null ? void 0 : ccResult.relayDepositAddress) || (ccResult == null ? void 0 : ccResult.depositAddress);
|
|
23482
|
+
const showTransferNoticeModal = useCallback((message, title = "Transfer not detected yet") => {
|
|
23483
|
+
setTransferNoticeModal({ title, message });
|
|
23484
|
+
}, []);
|
|
23481
23485
|
const merchantReceiveNetworks = (merchantNetworks == null ? void 0 : merchantNetworks.length) ? merchantNetworks : networks;
|
|
23482
23486
|
const isMerchantReceiveNetwork = useCallback((network) => {
|
|
23483
23487
|
var _a2;
|
|
@@ -23671,6 +23675,14 @@ const CoinleyPaymentInternal = ({
|
|
|
23671
23675
|
underpayment
|
|
23672
23676
|
});
|
|
23673
23677
|
}, [activateUnderpaymentFlow, ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, ccResult == null ? void 0 : ccResult.id, ccResult == null ? void 0 : ccResult.originChainId, ccResult == null ? void 0 : ccResult.relayDepositAddress]);
|
|
23678
|
+
const clearUnderpaymentUiState = useCallback((paymentId) => {
|
|
23679
|
+
setUnderpaymentInfo(null);
|
|
23680
|
+
setUnderpaymentChoice(null);
|
|
23681
|
+
setUnderpaymentView("choice");
|
|
23682
|
+
setManualCheckStatus(null);
|
|
23683
|
+
setCcManualCheckStatus(null);
|
|
23684
|
+
clearUnderpaymentRecovery(paymentId || activeTransferPaymentId);
|
|
23685
|
+
}, [activeTransferPaymentId, clearUnderpaymentRecovery]);
|
|
23674
23686
|
const selectedNetworkIsSolana = (selectedNetwork == null ? void 0 : selectedNetwork.chainType) === "solana" || (selectedNetwork == null ? void 0 : selectedNetwork.shortName) === "solana";
|
|
23675
23687
|
const sourceNeedsMerchantBridge = Boolean(
|
|
23676
23688
|
selectedNetwork && !selectedNetworkIsSolana && !isMerchantReceiveNetwork(selectedNetwork)
|
|
@@ -25119,6 +25131,9 @@ const CoinleyPaymentInternal = ({
|
|
|
25119
25131
|
setCcPhase(status.phase);
|
|
25120
25132
|
if (activateUnderpaymentFromCrossChainStatus(status)) {
|
|
25121
25133
|
setCcManualCheckStatus(null);
|
|
25134
|
+
} else if (status.phase === "bridging") {
|
|
25135
|
+
clearUnderpaymentUiState(status.paymentId || ccResult.id);
|
|
25136
|
+
showTransferNoticeModal("We have detected your transfer and are waiting for the bridge to complete. We will keep checking automatically.", "Transfer detected");
|
|
25122
25137
|
} else if ((status.phase === "received" || status.phase === "settled") && !ccSucceeded.current) {
|
|
25123
25138
|
ccSucceeded.current = true;
|
|
25124
25139
|
onSuccess == null ? void 0 : onSuccess(status);
|
|
@@ -25126,6 +25141,7 @@ const CoinleyPaymentInternal = ({
|
|
|
25126
25141
|
setCcManualCheckStatus("failed");
|
|
25127
25142
|
} else {
|
|
25128
25143
|
setCcManualCheckStatus("not_found");
|
|
25144
|
+
showTransferNoticeModal("We have not detected your transfer yet. It can take a few moments to appear on-chain, and we will keep checking automatically.");
|
|
25129
25145
|
}
|
|
25130
25146
|
} catch (error2) {
|
|
25131
25147
|
setCcError(error2.message || "Could not check this payment yet. Please try again.");
|
|
@@ -25144,6 +25160,8 @@ const CoinleyPaymentInternal = ({
|
|
|
25144
25160
|
setCcPhase(s.phase);
|
|
25145
25161
|
if (activateUnderpaymentFromCrossChainStatus(s)) {
|
|
25146
25162
|
setCcManualCheckStatus(null);
|
|
25163
|
+
} else if (s.phase === "bridging") {
|
|
25164
|
+
clearUnderpaymentUiState(s.paymentId || ccResult.id);
|
|
25147
25165
|
} else if ((s.phase === "received" || s.phase === "settled") && !ccSucceeded.current) {
|
|
25148
25166
|
ccSucceeded.current = true;
|
|
25149
25167
|
onSuccess == null ? void 0 : onSuccess(s);
|
|
@@ -25159,7 +25177,7 @@ const CoinleyPaymentInternal = ({
|
|
|
25159
25177
|
cancelled = true;
|
|
25160
25178
|
clearInterval(t);
|
|
25161
25179
|
};
|
|
25162
|
-
}, [activateUnderpaymentFromCrossChainStatus, ccResult == null ? void 0 : ccResult.id, onSuccess, paymentFlow.api]);
|
|
25180
|
+
}, [activateUnderpaymentFromCrossChainStatus, ccResult == null ? void 0 : ccResult.id, clearUnderpaymentUiState, onSuccess, paymentFlow.api]);
|
|
25163
25181
|
const handleGenerateTransferAddress = async () => {
|
|
25164
25182
|
if (isConverting) {
|
|
25165
25183
|
setError("Please wait for currency conversion to complete");
|
|
@@ -26079,17 +26097,19 @@ const CoinleyPaymentInternal = ({
|
|
|
26079
26097
|
}
|
|
26080
26098
|
}
|
|
26081
26099
|
setManualCheckStatus("not_found");
|
|
26100
|
+
showTransferNoticeModal("We have not detected your transfer yet. It can take a few moments to appear on-chain, and we will keep checking automatically.");
|
|
26082
26101
|
manualCheckTimeout.current = setTimeout(() => {
|
|
26083
26102
|
setManualCheckStatus(null);
|
|
26084
26103
|
}, 1e4);
|
|
26085
26104
|
} catch (error2) {
|
|
26086
26105
|
console.warn("[ManualCheck] Error:", error2.message);
|
|
26087
26106
|
setManualCheckStatus("not_found");
|
|
26107
|
+
showTransferNoticeModal("We have not detected your transfer yet. It can take a few moments to appear on-chain, and we will keep checking automatically.");
|
|
26088
26108
|
manualCheckTimeout.current = setTimeout(() => {
|
|
26089
26109
|
setManualCheckStatus(null);
|
|
26090
26110
|
}, 1e4);
|
|
26091
26111
|
}
|
|
26092
|
-
}, [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]);
|
|
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]);
|
|
26093
26113
|
if (!isOpen) return null;
|
|
26094
26114
|
if (currentStep === PAYMENT_STEPS.PROCESSING) {
|
|
26095
26115
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
@@ -26152,7 +26172,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26152
26172
|
] });
|
|
26153
26173
|
}
|
|
26154
26174
|
const paymentAmountLabel = isConverting ? "..." : `$${formatAmount(paymentAmount || (config == null ? void 0 : config.amount) || 0)}`;
|
|
26155
|
-
const underpaymentOffsetAmountLabel = underpaymentInfo ?
|
|
26175
|
+
const underpaymentOffsetAmountLabel = underpaymentInfo ? `${formatAmount(underpaymentInfo.shortfallAmount || 0)} ${underpaymentInfo.tokenSymbol || (selectedToken == null ? void 0 : selectedToken.symbol) || ""}`.trim() : paymentAmountLabel;
|
|
26156
26176
|
const summaryPaymentAmountLabel = underpaymentInfo && (underpaymentView === "offset" || underpaymentView === "refund") ? underpaymentOffsetAmountLabel : paymentAmountLabel;
|
|
26157
26177
|
const getTokenDisplaySymbol = (token) => (token == null ? void 0 : token.symbol) || (token == null ? void 0 : token.tokenSymbol) || (token == null ? void 0 : token.currency) || (token == null ? void 0 : token.ticker) || (token == null ? void 0 : token.name) || "Token";
|
|
26158
26178
|
const getLogoFallbackUrl = (label = "?", background = "7042D2") => {
|
|
@@ -26171,7 +26191,12 @@ const CoinleyPaymentInternal = ({
|
|
|
26171
26191
|
};
|
|
26172
26192
|
const getNetworkDisplayName = (network) => (network == null ? void 0 : network.name) || (network == null ? void 0 : network.displayName) || (network == null ? void 0 : network.shortName) || "Network";
|
|
26173
26193
|
const getNetworkDisplayLogo = (network) => (network == null ? void 0 : network.logo) || (network == null ? void 0 : network.logoURI) || (network == null ? void 0 : network.icon) || getNetworkLogoUrl(network) || getFallbackNetworkLogoUrl(getNetworkDisplayName(network));
|
|
26174
|
-
const
|
|
26194
|
+
const hasDirectTransferNetworks = networks.some((network) => {
|
|
26195
|
+
const chainId = parseInt(network.chainId);
|
|
26196
|
+
const supportedChains = [8453, 56, 42161, 137, 10, 43114, 143, 59144, 534352, 130];
|
|
26197
|
+
return supportedChains.includes(chainId);
|
|
26198
|
+
});
|
|
26199
|
+
const isCrossChainTransferSetupView = activeTab === PAYMENT_TABS.TRANSFER && !ccResult && !(paymentData == null ? void 0 : paymentData.depositAddress) && !hasDirectTransferNetworks;
|
|
26175
26200
|
const isCrossChainTransferAddressView = activeTab === PAYMENT_TABS.TRANSFER && !!ccResult;
|
|
26176
26201
|
const isTransferSetupView = activeTab === PAYMENT_TABS.TRANSFER && !ccResult && (!selectedNetwork || !selectedToken || !(paymentData == null ? void 0 : paymentData.depositAddress));
|
|
26177
26202
|
const isQrSetupView = activeTab === PAYMENT_TABS.QR && (!selectedNetwork || !selectedToken || !paymentData || (paymentData == null ? void 0 : paymentData.isDepositPayment));
|
|
@@ -26289,9 +26314,8 @@ const CoinleyPaymentInternal = ({
|
|
|
26289
26314
|
] }),
|
|
26290
26315
|
renderUnderpaymentWarning(
|
|
26291
26316
|
"Important!",
|
|
26292
|
-
|
|
26293
|
-
)
|
|
26294
|
-
(manualCheckStatus === "not_found" || ccManualCheckStatus === "not_found") && /* @__PURE__ */ jsx("div", { className: "mb-3 rounded-xl border border-amber-200 bg-amber-50 p-3", children: /* @__PURE__ */ jsx("p", { className: "text-sm leading-5 text-amber-700", children: "We have not detected the offset yet. It can take a few moments to appear on-chain, and we will keep checking automatically." }) })
|
|
26317
|
+
`This is the same wallet address for your underpaid transaction. Send only the remaining offset amount (${underpaymentOffsetAmountLabel}) and keep enough native gas in your wallet for the network fee.`
|
|
26318
|
+
)
|
|
26295
26319
|
] });
|
|
26296
26320
|
const renderUnderpaymentRefundPanel = () => /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26297
26321
|
renderUnderpaymentWarning(
|
|
@@ -26317,7 +26341,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26317
26341
|
),
|
|
26318
26342
|
refundRequestMessage && /* @__PURE__ */ jsx("p", { className: `mt-2 text-center text-xs leading-5 ${refundRequestStatus === "error" ? "text-red-600" : "text-[#8B8E98]"}`, children: refundRequestMessage })
|
|
26319
26343
|
] });
|
|
26320
|
-
networks.filter((network) => {
|
|
26344
|
+
const transferNetworks = networks.filter((network) => {
|
|
26321
26345
|
const chainId = parseInt(network.chainId);
|
|
26322
26346
|
const supportedChains = [8453, 56, 42161, 137, 10, 43114, 143, 59144, 534352, 130];
|
|
26323
26347
|
return supportedChains.includes(chainId);
|
|
@@ -26421,6 +26445,41 @@ const CoinleyPaymentInternal = ({
|
|
|
26421
26445
|
] })
|
|
26422
26446
|
] });
|
|
26423
26447
|
};
|
|
26448
|
+
const renderTransferSetupPanel = () => /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26449
|
+
renderCheckoutSelect({
|
|
26450
|
+
id: "transfer-network",
|
|
26451
|
+
label: "Select a Network",
|
|
26452
|
+
value: selectedNetwork == null ? void 0 : selectedNetwork.id,
|
|
26453
|
+
placeholder: "Select a network",
|
|
26454
|
+
options: transferNetworks,
|
|
26455
|
+
getLabel: (network) => getNetworkDisplayName(network),
|
|
26456
|
+
getIcon: (network) => getNetworkDisplayLogo(network),
|
|
26457
|
+
compact: true,
|
|
26458
|
+
elevated: true,
|
|
26459
|
+
maxVisibleItems: 4,
|
|
26460
|
+
onChange: (networkId) => {
|
|
26461
|
+
const network = transferNetworks.find((item) => item.id === networkId);
|
|
26462
|
+
if (network) handleNetworkSelect(network);
|
|
26463
|
+
}
|
|
26464
|
+
}),
|
|
26465
|
+
renderCheckoutSelect({
|
|
26466
|
+
id: "transfer-token",
|
|
26467
|
+
label: "Pick a Token",
|
|
26468
|
+
value: selectedToken == null ? void 0 : selectedToken.id,
|
|
26469
|
+
placeholder: selectedNetwork ? "Select a token" : "Select a token",
|
|
26470
|
+
disabled: !selectedNetwork || availableTokens.length === 0,
|
|
26471
|
+
options: availableTokens,
|
|
26472
|
+
getLabel: (token) => getTokenDisplaySymbol(token),
|
|
26473
|
+
getIcon: (token) => getTokenDisplayLogo(token),
|
|
26474
|
+
compact: true,
|
|
26475
|
+
elevated: true,
|
|
26476
|
+
maxVisibleItems: 2,
|
|
26477
|
+
onChange: (tokenId) => {
|
|
26478
|
+
const token = availableTokens.find((item) => item.id === tokenId);
|
|
26479
|
+
if (token) handleTokenSelect(token);
|
|
26480
|
+
}
|
|
26481
|
+
})
|
|
26482
|
+
] });
|
|
26424
26483
|
const renderWalletExtensionSetupPanel = () => /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26425
26484
|
!selectedNetwork && renderWalletNetworkPickerPanel(),
|
|
26426
26485
|
selectedNetwork && !selectedToken && renderWalletTokenPickerPanel(),
|
|
@@ -26958,6 +27017,23 @@ const CoinleyPaymentInternal = ({
|
|
|
26958
27017
|
/* @__PURE__ */ jsx("p", { className: `${isTightWalletView ? "mt-1" : isCompactCheckoutView ? "mt-2" : "mt-3"} text-xs text-[#A9ABB2]`, children: "Powered by Stablezact" })
|
|
26959
27018
|
] });
|
|
26960
27019
|
};
|
|
27020
|
+
const renderTransferNoticeModal = () => {
|
|
27021
|
+
if (!transferNoticeModal) return null;
|
|
27022
|
+
return /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-[70] flex items-center justify-center bg-black/45 px-4", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-[340px] rounded-2xl bg-white p-5 text-center shadow-2xl", children: [
|
|
27023
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 flex h-11 w-11 items-center justify-center rounded-full bg-amber-50 text-amber-600", 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: 2, d: "M12 9v4m0 4h.01M12 3a9 9 0 110 18 9 9 0 010-18z" }) }) }),
|
|
27024
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-semibold text-[#111827]", children: transferNoticeModal.title }),
|
|
27025
|
+
/* @__PURE__ */ jsx("p", { className: "mb-5 text-sm leading-5 text-[#6B7280]", children: transferNoticeModal.message }),
|
|
27026
|
+
/* @__PURE__ */ jsx(
|
|
27027
|
+
"button",
|
|
27028
|
+
{
|
|
27029
|
+
type: "button",
|
|
27030
|
+
onClick: () => setTransferNoticeModal(null),
|
|
27031
|
+
className: "h-11 w-full rounded-xl bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
|
|
27032
|
+
children: "Got it"
|
|
27033
|
+
}
|
|
27034
|
+
)
|
|
27035
|
+
] }) });
|
|
27036
|
+
};
|
|
26961
27037
|
const renderTabContent = () => {
|
|
26962
27038
|
var _a2, _b, _c, _d;
|
|
26963
27039
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -27233,7 +27309,7 @@ const CoinleyPaymentInternal = ({
|
|
|
27233
27309
|
] }),
|
|
27234
27310
|
activeTab === PAYMENT_TABS.QR && /* @__PURE__ */ jsx(Fragment, { children: qrWalletChoiceConfirmed ? renderQrPaymentPanel() : renderQrWalletChoicePanel() }),
|
|
27235
27311
|
activeTab === PAYMENT_TABS.TRANSFER && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27236
|
-
|
|
27312
|
+
isCrossChainTransferSetupView && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27237
27313
|
renderCheckoutSelect({
|
|
27238
27314
|
id: "cross-chain-network",
|
|
27239
27315
|
label: "Select a Network",
|
|
@@ -27265,8 +27341,37 @@ const CoinleyPaymentInternal = ({
|
|
|
27265
27341
|
}),
|
|
27266
27342
|
ccError && /* @__PURE__ */ jsx("div", { className: "mb-3 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs font-medium text-red-600", children: ccError })
|
|
27267
27343
|
] }),
|
|
27344
|
+
!isCrossChainTransferSetupView && !ccResult && !(paymentData == null ? void 0 : paymentData.depositAddress) && renderTransferSetupPanel(),
|
|
27345
|
+
!ccResult && (paymentData == null ? void 0 : paymentData.depositAddress) && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27346
|
+
!underpaymentInfo && /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-4", children: [
|
|
27347
|
+
/* @__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("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-[#E5E7EB] border-t-[#7042D2]" }) }) }),
|
|
27348
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
27349
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Wallet address" }),
|
|
27350
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-[60px] items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-2", children: [
|
|
27351
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-all text-sm leading-5 text-[#1F2430]", children: paymentData.depositAddress }),
|
|
27352
|
+
/* @__PURE__ */ jsx(
|
|
27353
|
+
"button",
|
|
27354
|
+
{
|
|
27355
|
+
onClick: () => copyToClipboard(paymentData.depositAddress, "depositAddress"),
|
|
27356
|
+
className: `flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg transition-colors ${copiedField === "depositAddress" ? "bg-green-100 text-green-600" : "text-[#7042D2] hover:bg-purple-50"}`,
|
|
27357
|
+
"aria-label": "Copy wallet address",
|
|
27358
|
+
children: copiedField === "depositAddress" ? /* @__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: "M5 13l4 4L19 7" }) }) : /* @__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: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" }) })
|
|
27359
|
+
}
|
|
27360
|
+
)
|
|
27361
|
+
] })
|
|
27362
|
+
] })
|
|
27363
|
+
] }),
|
|
27364
|
+
underpaymentInfo ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27365
|
+
underpaymentView === "choice" && renderUnderpaymentChoicePanel(),
|
|
27366
|
+
underpaymentView === "offset" && renderUnderpaymentOffsetPanel(),
|
|
27367
|
+
underpaymentView === "refund" && renderUnderpaymentRefundPanel()
|
|
27368
|
+
] }) : /* @__PURE__ */ jsx(Fragment, { children: renderUnderpaymentWarning(
|
|
27369
|
+
"Important!",
|
|
27370
|
+
"Use this wallet address for this transfer only. Send from the selected network and include enough native token for network fees."
|
|
27371
|
+
) })
|
|
27372
|
+
] }),
|
|
27268
27373
|
ccResult && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27269
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-4", children: [
|
|
27374
|
+
!underpaymentInfo && /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-4", children: [
|
|
27270
27375
|
/* @__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("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-[#E5E7EB] border-t-[#7042D2]" }) }) }),
|
|
27271
27376
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
27272
27377
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Wallet address" }),
|
|
@@ -27293,7 +27398,6 @@ const CoinleyPaymentInternal = ({
|
|
|
27293
27398
|
"Important!",
|
|
27294
27399
|
"Use this wallet address for this transfer only. Send from the selected network and include enough native token for network fees."
|
|
27295
27400
|
),
|
|
27296
|
-
ccManualCheckStatus === "not_found" && /* @__PURE__ */ jsx("div", { className: "mb-3 rounded-xl border border-amber-200 bg-amber-50 p-3", children: /* @__PURE__ */ jsx("p", { className: "text-sm leading-5 text-amber-700", children: "We have not detected your transfer yet. It can take a few moments to appear on-chain, and we will keep checking automatically." }) }),
|
|
27297
27401
|
ccPhase === "failed" ? /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-center text-xs font-medium text-red-600", children: "Payment failed — please try again" }) : ccPhase === "received" || ccPhase === "settled" ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 text-xs font-medium text-green-600", children: [
|
|
27298
27402
|
/* @__PURE__ */ jsx("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-green-500" }),
|
|
27299
27403
|
"Payment received"
|
|
@@ -27438,7 +27542,8 @@ const CoinleyPaymentInternal = ({
|
|
|
27438
27542
|
/* @__PURE__ */ jsx("div", { className: `min-h-0 flex-1 ${isCheckoutDropdownOpen ? "overflow-visible" : "overflow-y-auto coinley-scroll"} pb-1`, children: renderTabContent() }),
|
|
27439
27543
|
renderCheckoutFooter()
|
|
27440
27544
|
] })
|
|
27441
|
-
] }) })
|
|
27545
|
+
] }) }),
|
|
27546
|
+
renderTransferNoticeModal()
|
|
27442
27547
|
] });
|
|
27443
27548
|
};
|
|
27444
27549
|
const CoinleyPayment = (props) => {
|
|
@@ -27475,4 +27580,4 @@ export {
|
|
|
27475
27580
|
isFeatureEnabled as i,
|
|
27476
27581
|
logo as l
|
|
27477
27582
|
};
|
|
27478
|
-
//# sourceMappingURL=CoinleyPayment-
|
|
27583
|
+
//# sourceMappingURL=CoinleyPayment-VQ3D1nhQ.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-VQ3D1nhQ.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-D7dsllG3.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-VQ3D1nhQ.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-BRa7mnYF.js.map
|