coinley-pay 0.40.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.
@@ -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-JTjDQGRR.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-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-DeOCxv7e.js");
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-3_yg517i.js");
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-DeOCxv7e.js");
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");
@@ -26096,16 +26096,20 @@ const CoinleyPaymentInternal = ({
26096
26096
  const refundStatus = ((_a2 = result == null ? void 0 : result.payment) == null ? void 0 : _a2.refundStatus) || "pending";
26097
26097
  setRefundRequestSubmitted(true);
26098
26098
  setRefundRequestStatus(refundStatus === "refunded" ? "refunded" : "pending");
26099
- setRefundRequestMessage(
26100
- refundStatus === "refunded" ? "Refund sent successfully." : "Refund request received. We will process it automatically; if network gas is low, it may remain pending until the sweeper wallet is funded."
26101
- );
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
+ }
26102
26106
  } catch (error2) {
26103
26107
  console.warn("[RefundRequest] Error:", error2.message);
26104
26108
  setRefundRequestSubmitted(false);
26105
26109
  setRefundRequestStatus("error");
26106
26110
  setRefundRequestMessage(error2.message || "Failed to submit refund request. Please try again.");
26107
26111
  }
26108
- }, [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]);
26109
26113
  const handleDepositManualCheck = useCallback(async () => {
26110
26114
  if (manualCheckStatus === "checking" || !(paymentData == null ? void 0 : paymentData.id)) return;
26111
26115
  setManualCheckStatus("checking");
@@ -26417,7 +26421,7 @@ const CoinleyPaymentInternal = ({
26417
26421
  "Amount received is less than expected",
26418
26422
  `We received $${formatAmount(underpaymentInfo.receivedAmount || 0)} but expected $${formatAmount(underpaymentInfo.expectedAmount || paymentAmount || 0)}. Your transaction is on hold, please choose how to proceed.`
26419
26423
  ),
26420
- /* @__PURE__ */ jsxs("div", { className: "mb-5 grid grid-cols-1 gap-2 min-[380px]:grid-cols-2", children: [
26424
+ /* @__PURE__ */ jsxs("div", { className: "mb-5 grid grid-cols-2 gap-2", children: [
26421
26425
  renderUnderpaymentOptionCard({
26422
26426
  choice: "offset",
26423
26427
  title: "Send offset",
@@ -27722,4 +27726,4 @@ export {
27722
27726
  isFeatureEnabled as i,
27723
27727
  logo as l
27724
27728
  };
27725
- //# sourceMappingURL=CoinleyPayment-Fe-W3OyQ.js.map
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-Fe-W3OyQ.js";
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-3_yg517i.js.map
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-Fe-W3OyQ.js";
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-DeOCxv7e.js.map
245
+ //# sourceMappingURL=appKitSolana-B-Mnxul0.js.map