coinley-pay 0.42.0 → 0.44.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-B849KAFT.js → CoinleyPayment-DyKwmgOv.js} +39 -10
- package/dist/{appKitEVM-DtRSGjqO.js → appKitEVM-UnYPliV_.js} +2 -2
- package/dist/{appKitSolana-Bisj88pX.js → appKitSolana-CG78TZQO.js} +2 -2
- package/dist/coinley-vanilla.min.js +576 -576
- package/dist/{index-B7RLl8Y_.js → index-BKIoJ0GG.js} +3 -3
- package/dist/{index-CV3EsiAj.js → index-BxLKbwy5.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 +2 -2
|
@@ -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-BxLKbwy5.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";
|
|
@@ -21122,7 +21122,7 @@ const WalletSelector = ({
|
|
|
21122
21122
|
try {
|
|
21123
21123
|
setAppKitError(null);
|
|
21124
21124
|
setWalletConnectAddress(solanaAccountState.address);
|
|
21125
|
-
const { createWalletConnectAdapter } = await import("./appKitSolana-
|
|
21125
|
+
const { createWalletConnectAdapter } = await import("./appKitSolana-CG78TZQO.js");
|
|
21126
21126
|
const adapter = createWalletConnectAdapter(solanaAccountState.address);
|
|
21127
21127
|
await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
|
|
21128
21128
|
console.log("✅ WalletConnect synced with SDK");
|
|
@@ -21227,7 +21227,7 @@ const WalletSelector = ({
|
|
|
21227
21227
|
setAppKitLoading(true);
|
|
21228
21228
|
setAppKitError(null);
|
|
21229
21229
|
try {
|
|
21230
|
-
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-
|
|
21230
|
+
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-UnYPliV_.js");
|
|
21231
21231
|
await initializeAppKitEVM(wagmiConfig);
|
|
21232
21232
|
await openAppKitModal();
|
|
21233
21233
|
} catch (error) {
|
|
@@ -21247,7 +21247,7 @@ const WalletSelector = ({
|
|
|
21247
21247
|
setAppKitError(null);
|
|
21248
21248
|
try {
|
|
21249
21249
|
console.log("📦 Loading AppKit Solana module...");
|
|
21250
|
-
const { initializeAppKitSolana } = await import("./appKitSolana-
|
|
21250
|
+
const { initializeAppKitSolana } = await import("./appKitSolana-CG78TZQO.js");
|
|
21251
21251
|
console.log("✅ Module loaded, initializing...");
|
|
21252
21252
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
21253
21253
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -26520,7 +26520,26 @@ const CoinleyPaymentInternal = ({
|
|
|
26520
26520
|
})
|
|
26521
26521
|
] })
|
|
26522
26522
|
] });
|
|
26523
|
-
const
|
|
26523
|
+
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: [
|
|
26524
|
+
/* @__PURE__ */ jsxs("div", { className: "relative mb-4 flex h-28 w-40 items-center justify-center", children: [
|
|
26525
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-5 bottom-1 h-4 rounded-full bg-[#7042D2]/10 blur-md" }),
|
|
26526
|
+
/* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className: "relative h-28 w-40 object-contain" })
|
|
26527
|
+
] }),
|
|
26528
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-lg font-semibold text-[#111827]", children: title }),
|
|
26529
|
+
/* @__PURE__ */ jsx("p", { className: "mx-auto max-w-[330px] text-sm leading-5 text-[#8B8E98]", children: description }),
|
|
26530
|
+
detail && /* @__PURE__ */ jsxs("div", { className: "mt-5 w-full rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-3 text-left", children: [
|
|
26531
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between text-xs", children: [
|
|
26532
|
+
/* @__PURE__ */ jsx("span", { className: "text-[#A3A5AC]", children: "Status" }),
|
|
26533
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[#7042D2]", children: "Processing" })
|
|
26534
|
+
] }),
|
|
26535
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs leading-5 text-[#535865]", children: detail })
|
|
26536
|
+
] })
|
|
26537
|
+
] });
|
|
26538
|
+
const renderUnderpaymentOffsetPanel = () => manualCheckStatus === "checking" || ccManualCheckStatus === "checking" ? renderRecoveryLoadingPanel({
|
|
26539
|
+
title: "Checking your offset",
|
|
26540
|
+
description: "We are checking the blockchain for your offset payment. This usually takes a few seconds.",
|
|
26541
|
+
detail: `Waiting for the remaining ${underpaymentOffsetAmountLabel} on ${underpaymentInfo.refundNetworkLabel || getOffsetSuccessNetworkName(selectedNetwork)}.`
|
|
26542
|
+
}) : /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26524
26543
|
/* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-start gap-3", children: [
|
|
26525
26544
|
/* @__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" }) }) }),
|
|
26526
26545
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 pt-1", children: [
|
|
@@ -26544,7 +26563,11 @@ const CoinleyPaymentInternal = ({
|
|
|
26544
26563
|
`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.`
|
|
26545
26564
|
)
|
|
26546
26565
|
] });
|
|
26547
|
-
const renderUnderpaymentRefundPanel = () =>
|
|
26566
|
+
const renderUnderpaymentRefundPanel = () => refundRequestStatus === "submitting" ? renderRecoveryLoadingPanel({
|
|
26567
|
+
title: "Preparing your refund",
|
|
26568
|
+
description: "We are submitting your refund request and checking whether it can be sent immediately.",
|
|
26569
|
+
detail: `Refunding the received ${underpaymentInfo.tokenSymbol} on ${underpaymentInfo.refundNetworkLabel}.`
|
|
26570
|
+
}) : /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26548
26571
|
renderUnderpaymentWarning(
|
|
26549
26572
|
`Refund of $${formatAmount(underpaymentInfo.receivedAmount || 0)} ${underpaymentInfo.tokenSymbol}`,
|
|
26550
26573
|
`Provide a ${underpaymentInfo.tokenSymbol} wallet address on the same network (${underpaymentInfo.refundNetworkLabel}) to receive your refund. Network fees will be deducted.`
|
|
@@ -27154,15 +27177,21 @@ const CoinleyPaymentInternal = ({
|
|
|
27154
27177
|
});
|
|
27155
27178
|
}
|
|
27156
27179
|
if (underpaymentView === "offset") {
|
|
27180
|
+
if (manualCheckStatus === "checking" || ccManualCheckStatus === "checking") {
|
|
27181
|
+
return null;
|
|
27182
|
+
}
|
|
27157
27183
|
return renderFooterPrimaryButton({
|
|
27158
|
-
label:
|
|
27184
|
+
label: "I've made transfer",
|
|
27159
27185
|
onClick: ccResult ? handleCrossChainManualCheck : handleDepositManualCheck,
|
|
27160
|
-
disabled:
|
|
27186
|
+
disabled: false
|
|
27161
27187
|
});
|
|
27162
27188
|
}
|
|
27163
27189
|
if (underpaymentView === "refund") {
|
|
27190
|
+
if (refundRequestStatus === "submitting") {
|
|
27191
|
+
return null;
|
|
27192
|
+
}
|
|
27164
27193
|
return renderFooterPrimaryButton({
|
|
27165
|
-
label:
|
|
27194
|
+
label: refundRequestSubmitted ? "Refund request submitted" : "Submit refund request",
|
|
27166
27195
|
onClick: handleRefundRequestSubmit,
|
|
27167
27196
|
disabled: !refundAddress.trim() || refundRequestStatus === "submitting" || refundRequestStatus === "pending" || refundRequestStatus === "refunded"
|
|
27168
27197
|
});
|
|
@@ -27800,4 +27829,4 @@ export {
|
|
|
27800
27829
|
chainTransports as c,
|
|
27801
27830
|
isFeatureEnabled as i
|
|
27802
27831
|
};
|
|
27803
|
-
//# sourceMappingURL=CoinleyPayment-
|
|
27832
|
+
//# sourceMappingURL=CoinleyPayment-DyKwmgOv.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-DyKwmgOv.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-UnYPliV_.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-DyKwmgOv.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-CG78TZQO.js.map
|