coinley-pay 0.65.0 → 0.66.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-BovUsM20.js → CoinleyPayment-CbWEGZOi.js} +99 -89
- package/dist/{appKitEVM-CGJ7ZTpW.js → appKitEVM-CymaRMbc.js} +2 -2
- package/dist/{appKitSolana-De-Lx7eT.js → appKitSolana-BYyu0_pA.js} +2 -2
- package/dist/coinley-vanilla.min.js +1 -1
- package/dist/{index-DlWS8_3x.js → index-BK2u3J1p.js} +3 -3
- package/dist/{index-DdBnTTHn.js → index-CzJEMYAR.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
|
@@ -6,7 +6,7 @@ import { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
|
6
6
|
import ReactDOM, { createPortal } from "react-dom";
|
|
7
7
|
import { useConnect, useAccount, useSwitchChain, useSendTransaction, useWaitForTransactionReceipt, WagmiProvider, useDisconnect } from "wagmi";
|
|
8
8
|
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
9
|
-
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-
|
|
9
|
+
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-BK2u3J1p.js";
|
|
10
10
|
import { createConfig, fallback, http, getAccount as getAccount$1, getWalletClient, simulateContract, writeContract, readContract, waitForTransactionReceipt, estimateFeesPerGas as estimateFeesPerGas$1 } from "@wagmi/core";
|
|
11
11
|
import { injected, metaMask, coinbaseWallet, walletConnect } from "@wagmi/connectors";
|
|
12
12
|
import { defineChain as defineChain$1, erc20Abi, http as http$1, createPublicClient, fallback as fallback$1 } from "viem";
|
|
@@ -21126,7 +21126,7 @@ const WalletSelector = ({
|
|
|
21126
21126
|
try {
|
|
21127
21127
|
setAppKitError(null);
|
|
21128
21128
|
setWalletConnectAddress(solanaAccountState.address);
|
|
21129
|
-
const { createWalletConnectAdapter } = await import("./appKitSolana-
|
|
21129
|
+
const { createWalletConnectAdapter } = await import("./appKitSolana-BYyu0_pA.js");
|
|
21130
21130
|
const adapter = createWalletConnectAdapter(solanaAccountState.address);
|
|
21131
21131
|
await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
|
|
21132
21132
|
console.log("✅ WalletConnect synced with SDK");
|
|
@@ -21231,7 +21231,7 @@ const WalletSelector = ({
|
|
|
21231
21231
|
setAppKitLoading(true);
|
|
21232
21232
|
setAppKitError(null);
|
|
21233
21233
|
try {
|
|
21234
|
-
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-
|
|
21234
|
+
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-CymaRMbc.js");
|
|
21235
21235
|
await initializeAppKitEVM(wagmiConfig);
|
|
21236
21236
|
await openAppKitModal();
|
|
21237
21237
|
} catch (error) {
|
|
@@ -21251,7 +21251,7 @@ const WalletSelector = ({
|
|
|
21251
21251
|
setAppKitError(null);
|
|
21252
21252
|
try {
|
|
21253
21253
|
console.log("📦 Loading AppKit Solana module...");
|
|
21254
|
-
const { initializeAppKitSolana } = await import("./appKitSolana-
|
|
21254
|
+
const { initializeAppKitSolana } = await import("./appKitSolana-BYyu0_pA.js");
|
|
21255
21255
|
console.log("✅ Module loaded, initializing...");
|
|
21256
21256
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
21257
21257
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -27106,7 +27106,7 @@ const CoinleyPaymentInternal = ({
|
|
|
27106
27106
|
{
|
|
27107
27107
|
type: "button",
|
|
27108
27108
|
onClick: () => isMobile ? handleMobileTabSelect(method.tab) : setActiveTab(method.tab),
|
|
27109
|
-
className: `min-w-0 truncate ${isTightWalletView ? "h-7 px-
|
|
27109
|
+
className: `min-w-0 truncate ${isTightWalletView ? "h-7 px-1.5 text-[13px]" : "h-9 px-2 text-[13px]"} rounded-lg transition-colors whitespace-nowrap ${method.tab === PAYMENT_TABS.QR ? "flex-[0.8]" : "flex-[1.3]"} ${activeTab === method.tab ? "bg-white text-[#5B2EEA] shadow-[0_1px_3px_rgba(31,36,48,0.08)]" : "text-[#535865] hover:text-[#1F2430]"}`,
|
|
27110
27110
|
children: isMobile ? method.mobileLabel : method.label
|
|
27111
27111
|
},
|
|
27112
27112
|
method.tab
|
|
@@ -27620,93 +27620,103 @@ const CoinleyPaymentInternal = ({
|
|
|
27620
27620
|
})
|
|
27621
27621
|
] });
|
|
27622
27622
|
const qrNetworkOptions = merchantFilteredNetworks.length > 0 ? merchantFilteredNetworks : networks;
|
|
27623
|
-
const renderQrWalletChoicePanel = () =>
|
|
27624
|
-
|
|
27625
|
-
|
|
27626
|
-
|
|
27627
|
-
|
|
27628
|
-
|
|
27629
|
-
|
|
27630
|
-
|
|
27631
|
-
|
|
27632
|
-
|
|
27633
|
-
|
|
27634
|
-
|
|
27635
|
-
|
|
27636
|
-
|
|
27637
|
-
|
|
27638
|
-
|
|
27639
|
-
|
|
27640
|
-
|
|
27641
|
-
|
|
27642
|
-
|
|
27643
|
-
|
|
27644
|
-
|
|
27645
|
-
|
|
27646
|
-
|
|
27647
|
-
|
|
27648
|
-
|
|
27649
|
-
|
|
27650
|
-
|
|
27651
|
-
|
|
27652
|
-
|
|
27653
|
-
|
|
27654
|
-
|
|
27655
|
-
|
|
27656
|
-
|
|
27657
|
-
|
|
27658
|
-
|
|
27659
|
-
"
|
|
27660
|
-
{
|
|
27661
|
-
|
|
27662
|
-
|
|
27663
|
-
|
|
27664
|
-
|
|
27665
|
-
|
|
27666
|
-
|
|
27667
|
-
|
|
27668
|
-
"
|
|
27669
|
-
|
|
27670
|
-
|
|
27671
|
-
|
|
27672
|
-
|
|
27673
|
-
|
|
27674
|
-
|
|
27623
|
+
const renderQrWalletChoicePanel = () => {
|
|
27624
|
+
if (qrWalletChoiceConfirmed) return renderQrPaymentPanel();
|
|
27625
|
+
return /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27626
|
+
renderCheckoutSelect({
|
|
27627
|
+
id: "qr-network",
|
|
27628
|
+
label: "Select a Network",
|
|
27629
|
+
value: selectedNetwork == null ? void 0 : selectedNetwork.id,
|
|
27630
|
+
placeholder: "Select a network",
|
|
27631
|
+
options: qrNetworkOptions,
|
|
27632
|
+
getLabel: (network) => getNetworkDisplayName(network),
|
|
27633
|
+
getIcon: (network) => getNetworkDisplayLogo(network),
|
|
27634
|
+
compact: true,
|
|
27635
|
+
elevated: true,
|
|
27636
|
+
maxVisibleItems: 4,
|
|
27637
|
+
onChange: (networkId) => {
|
|
27638
|
+
const network = qrNetworkOptions.find((item) => String(item.id) === String(networkId));
|
|
27639
|
+
if (network) handleNetworkSelect(network);
|
|
27640
|
+
}
|
|
27641
|
+
}),
|
|
27642
|
+
renderCheckoutSelect({
|
|
27643
|
+
id: "qr-token",
|
|
27644
|
+
label: "Select a Token",
|
|
27645
|
+
value: selectedToken == null ? void 0 : selectedToken.id,
|
|
27646
|
+
placeholder: "Select a token",
|
|
27647
|
+
disabled: !selectedNetwork || availableTokens.length === 0,
|
|
27648
|
+
options: availableTokens,
|
|
27649
|
+
getLabel: (token) => getTokenDisplaySymbol(token),
|
|
27650
|
+
getIcon: (token) => getTokenDisplayLogo(token),
|
|
27651
|
+
compact: true,
|
|
27652
|
+
elevated: true,
|
|
27653
|
+
maxVisibleItems: 4,
|
|
27654
|
+
onChange: (tokenId) => {
|
|
27655
|
+
const token = availableTokens.find((item) => String(item.id) === String(tokenId));
|
|
27656
|
+
if (token) handleTokenSelect(token);
|
|
27657
|
+
}
|
|
27658
|
+
}),
|
|
27659
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Please select your wallet app" }),
|
|
27660
|
+
/* @__PURE__ */ jsx("div", { className: "mb-3 grid grid-cols-3 gap-1.5", children: qrWalletOptions.map((wallet) => /* @__PURE__ */ jsxs(
|
|
27661
|
+
"button",
|
|
27662
|
+
{
|
|
27663
|
+
type: "button",
|
|
27664
|
+
onClick: () => handleQrWalletSelect(wallet.id),
|
|
27665
|
+
disabled: !selectedNetwork || !selectedToken || qrLoading || isConverting,
|
|
27666
|
+
className: `relative flex h-[76px] min-w-0 flex-col items-start justify-between rounded-lg border bg-[#FAFAFB] px-2.5 py-3 text-left transition-colors ${qrSelectedWalletId === wallet.id ? "border-[#7042D2] bg-[#FBF8FF]" : "border-[#EEF0F4] hover:border-[#C9B8F6]"} disabled:cursor-not-allowed disabled:opacity-60`,
|
|
27667
|
+
children: [
|
|
27668
|
+
qrSelectedWalletId === wallet.id && qrWalletChoiceConfirmed && /* @__PURE__ */ jsx("span", { className: "absolute right-[-5px] top-[-6px] flex h-4 w-4 items-center justify-center rounded-full border border-[#7042D2] bg-white text-[#7042D2]", children: /* @__PURE__ */ jsx("svg", { className: "h-2.5 w-2.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) }) }),
|
|
27669
|
+
/* @__PURE__ */ jsx(
|
|
27670
|
+
"img",
|
|
27671
|
+
{
|
|
27672
|
+
src: wallet.icon,
|
|
27673
|
+
alt: wallet.name,
|
|
27674
|
+
className: "h-6 w-6 object-contain",
|
|
27675
|
+
onError: (event) => {
|
|
27676
|
+
event.currentTarget.src = getLogoFallbackUrl(wallet.name);
|
|
27677
|
+
}
|
|
27675
27678
|
}
|
|
27676
|
-
|
|
27677
|
-
|
|
27678
|
-
|
|
27679
|
-
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27683
|
-
|
|
27684
|
-
|
|
27685
|
-
|
|
27686
|
-
|
|
27687
|
-
|
|
27688
|
-
|
|
27689
|
-
const renderQrPaymentPanel = () =>
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
/* @__PURE__ */ jsxs("
|
|
27693
|
-
|
|
27694
|
-
|
|
27695
|
-
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
|
|
27700
|
-
|
|
27679
|
+
),
|
|
27680
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 max-w-full truncate text-[13px] font-medium text-[#111827]", children: wallet.name })
|
|
27681
|
+
]
|
|
27682
|
+
},
|
|
27683
|
+
wallet.id
|
|
27684
|
+
)) }),
|
|
27685
|
+
qrLoading && /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center justify-center gap-2 rounded-lg bg-[#F8F8F9] px-3 py-2 text-xs text-[#535865]", children: [
|
|
27686
|
+
/* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "", className: "h-5 w-6 object-contain" }),
|
|
27687
|
+
"Generating QR code..."
|
|
27688
|
+
] }),
|
|
27689
|
+
!qrLoading && /* @__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" })
|
|
27690
|
+
] });
|
|
27691
|
+
};
|
|
27692
|
+
const renderQrPaymentPanel = () => {
|
|
27693
|
+
const chosenWallet = qrWalletOptions.find((wallet) => wallet.id === qrSelectedWalletId);
|
|
27694
|
+
return /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27695
|
+
chosenWallet && /* @__PURE__ */ jsxs("p", { className: "mb-3 text-sm font-semibold text-[#111827]", children: [
|
|
27696
|
+
"Scan with ",
|
|
27697
|
+
chosenWallet.name
|
|
27698
|
+
] }),
|
|
27699
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col gap-3 min-[380px]:flex-row min-[380px]:items-start", children: [
|
|
27700
|
+
/* @__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" }) }) }),
|
|
27701
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
27702
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-base font-semibold text-[#111827]", children: "Instructions" }),
|
|
27703
|
+
/* @__PURE__ */ jsxs("ol", { className: "list-inside list-decimal space-y-1 text-xs leading-5 text-[#111827]", children: [
|
|
27704
|
+
/* @__PURE__ */ jsx("li", { children: "Scan QR code with your phone camera" }),
|
|
27705
|
+
/* @__PURE__ */ jsx("li", { children: "The payment page will open inside your wallet app" }),
|
|
27706
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
27707
|
+
"Confirm the payment (",
|
|
27708
|
+
(selectedToken == null ? void 0 : selectedToken.symbol) ? `${formatAmount(paymentAmount || (config == null ? void 0 : config.amount) || 0)} ${selectedToken.symbol}` : paymentAmountLabel,
|
|
27709
|
+
")"
|
|
27710
|
+
] })
|
|
27701
27711
|
] })
|
|
27702
27712
|
] })
|
|
27713
|
+
] }),
|
|
27714
|
+
paymentData && !verifyingPayment && /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center justify-center gap-2 text-xs text-[#A3A5AC]", children: [
|
|
27715
|
+
/* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "", className: "h-5 w-6 object-contain" }),
|
|
27716
|
+
"Checking automatically every few seconds..."
|
|
27703
27717
|
] })
|
|
27704
|
-
] })
|
|
27705
|
-
|
|
27706
|
-
/* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "", className: "h-5 w-6 object-contain" }),
|
|
27707
|
-
"Checking automatically every few seconds..."
|
|
27708
|
-
] })
|
|
27709
|
-
] });
|
|
27718
|
+
] });
|
|
27719
|
+
};
|
|
27710
27720
|
const currentWalletMeta = (() => {
|
|
27711
27721
|
var _a2;
|
|
27712
27722
|
const activeConnectorId = wagmiConnector == null ? void 0 : wagmiConnector.id;
|
|
@@ -28549,4 +28559,4 @@ export {
|
|
|
28549
28559
|
chainTransports as c,
|
|
28550
28560
|
isFeatureEnabled as i
|
|
28551
28561
|
};
|
|
28552
|
-
//# sourceMappingURL=CoinleyPayment-
|
|
28562
|
+
//# sourceMappingURL=CoinleyPayment-CbWEGZOi.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-
|
|
1
|
+
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-CbWEGZOi.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-
|
|
116
|
+
//# sourceMappingURL=appKitEVM-CymaRMbc.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-
|
|
1
|
+
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-CbWEGZOi.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-
|
|
246
|
+
//# sourceMappingURL=appKitSolana-BYyu0_pA.js.map
|