coinley-pay 0.18.0 → 0.19.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-DjkvRRWK.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-BCVqFOuo.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";
@@ -21120,7 +21120,7 @@ const WalletSelector = ({
21120
21120
  try {
21121
21121
  setAppKitError(null);
21122
21122
  setWalletConnectAddress(solanaAccountState.address);
21123
- const { createWalletConnectAdapter } = await import("./appKitSolana-COVsc1hI.js");
21123
+ const { createWalletConnectAdapter } = await import("./appKitSolana-fo6vF0_g.js");
21124
21124
  const adapter = createWalletConnectAdapter(solanaAccountState.address);
21125
21125
  await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
21126
21126
  console.log("✅ WalletConnect synced with SDK");
@@ -21225,7 +21225,7 @@ const WalletSelector = ({
21225
21225
  setAppKitLoading(true);
21226
21226
  setAppKitError(null);
21227
21227
  try {
21228
- const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-7klvcQWP.js");
21228
+ const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-DNxsUg-8.js");
21229
21229
  await initializeAppKitEVM(wagmiConfig);
21230
21230
  await openAppKitModal();
21231
21231
  } catch (error) {
@@ -21245,7 +21245,7 @@ const WalletSelector = ({
21245
21245
  setAppKitError(null);
21246
21246
  try {
21247
21247
  console.log("📦 Loading AppKit Solana module...");
21248
- const { initializeAppKitSolana } = await import("./appKitSolana-COVsc1hI.js");
21248
+ const { initializeAppKitSolana } = await import("./appKitSolana-fo6vF0_g.js");
21249
21249
  console.log("✅ Module loaded, initializing...");
21250
21250
  const modal = await initializeAppKitSolana(solanaWallet);
21251
21251
  console.log("✅ AppKit Solana initialized successfully");
@@ -26894,6 +26894,7 @@ const CoinleyPaymentInternal = ({
26894
26894
  const isTransferAddressGenerated = activeTab === PAYMENT_TABS.TRANSFER && selectedNetwork && selectedToken && (paymentData == null ? void 0 : paymentData.depositAddress);
26895
26895
  const isWalletReadyForPayment = isWalletExtensionReadyView;
26896
26896
  const isWalletBackHeaderView = activeTab === PAYMENT_TABS.WALLET && showWalletConfirm;
26897
+ const isWalletTokenSelectionView = activeTab === PAYMENT_TABS.WALLET && selectedNetwork && !selectedToken && !showWalletConfirm && !(showMobileWalletPicker && isMobile);
26897
26898
  const isQrPaymentActiveView = activeTab === PAYMENT_TABS.QR && qrWalletChoiceConfirmed;
26898
26899
  const handleTransferAddressBack = async () => {
26899
26900
  setPaymentData((prev) => {
@@ -26914,6 +26915,12 @@ const CoinleyPaymentInternal = ({
26914
26915
  setSelectedToken(null);
26915
26916
  setPaymentData(null);
26916
26917
  };
26918
+ const handleWalletTokenSelectionBack = () => {
26919
+ setSelectedNetwork(null);
26920
+ setSelectedToken(null);
26921
+ setPaymentData(null);
26922
+ setWalletNetworkSearch("");
26923
+ };
26917
26924
  const handleQrBack = () => {
26918
26925
  setPaymentData(null);
26919
26926
  setQrCodeDataUrl("");
@@ -26934,10 +26941,10 @@ const CoinleyPaymentInternal = ({
26934
26941
  isMobile && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-3 pb-1 flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 bg-gray-300 rounded-full" }) }),
26935
26942
  /* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-1 flex-col px-4 ${isTightWalletView ? "pb-2 pt-3" : "pb-4 pt-4"}`, children: [
26936
26943
  /* @__PURE__ */ jsxs("div", { className: `${isTightWalletView ? "mb-3" : "mb-5"} flex items-center justify-between`, children: [
26937
- isTransferAddressGenerated || isWalletReadyForPayment || isQrPaymentActiveView || isWalletBackHeaderView ? /* @__PURE__ */ jsx(
26944
+ isTransferAddressGenerated || isWalletReadyForPayment || isQrPaymentActiveView || isWalletBackHeaderView || isWalletTokenSelectionView ? /* @__PURE__ */ jsx(
26938
26945
  "button",
26939
26946
  {
26940
- onClick: isTransferAddressGenerated ? handleTransferAddressBack : isQrPaymentActiveView ? handleQrBack : handleWalletReadyBack,
26947
+ onClick: isTransferAddressGenerated ? handleTransferAddressBack : isQrPaymentActiveView ? handleQrBack : isWalletTokenSelectionView ? handleWalletTokenSelectionBack : handleWalletReadyBack,
26941
26948
  className: `${isTightWalletView ? "h-8 w-8" : "h-9 w-9"} flex items-center justify-center rounded-full border border-[#E5E7EB] text-[#111827] transition-colors hover:bg-gray-50`,
26942
26949
  "aria-label": "Go back",
26943
26950
  children: /* @__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: "M15 19l-7-7 7-7" }) })
@@ -26995,4 +27002,4 @@ export {
26995
27002
  isFeatureEnabled as i,
26996
27003
  logo as l
26997
27004
  };
26998
- //# sourceMappingURL=CoinleyPayment-BRiKHFaK.js.map
27005
+ //# sourceMappingURL=CoinleyPayment-DK-cf2Vl.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-BRiKHFaK.js";
1
+ import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID, l as logo } from "./CoinleyPayment-DK-cf2Vl.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-7klvcQWP.js.map
115
+ //# sourceMappingURL=appKitEVM-DNxsUg-8.js.map
@@ -1,4 +1,4 @@
1
- import { F as FEATURES, l as logo, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BRiKHFaK.js";
1
+ import { F as FEATURES, l as logo, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-DK-cf2Vl.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-COVsc1hI.js.map
245
+ //# sourceMappingURL=appKitSolana-fo6vF0_g.js.map