coinley-checkout 0.2.6 → 0.2.8
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/coinley-checkout.es.js +50 -43
- package/dist/coinley-checkout.es.js.map +1 -1
- package/dist/style.css +70 -151
- package/package.json +5 -2
@@ -2352,17 +2352,11 @@ const QRCode = ({
|
|
2352
2352
|
includeMargin: true
|
2353
2353
|
}
|
2354
2354
|
) }),
|
2355
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
2356
|
-
|
2357
|
-
|
2358
|
-
"Send ",
|
2359
|
-
amount,
|
2360
|
-
" ",
|
2361
|
-
currency,
|
2362
|
-
" to:"
|
2363
|
-
] }),
|
2364
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-mono p-2 rounded overflow-auto break-all bg-gray-100 text-gray-700", children: walletAddress || "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" })
|
2355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center text-sm text-gray-700", children: [
|
2356
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-semibold text-gray-800", children: "Pay with QR Code" }),
|
2357
|
+
"Scan with your wallet app to pay"
|
2365
2358
|
] }),
|
2359
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3 w-full" }),
|
2366
2360
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-3 rounded bg-gray-100", children: [
|
2367
2361
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium mb-2 text-gray-800", children: "Payment Instructions" }),
|
2368
2362
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("ol", { className: "text-xs space-y-2 text-gray-600", children: [
|
@@ -2453,25 +2447,25 @@ const PaymentMethods = ({ onSelect, selected, theme = "light" }) => {
|
|
2453
2447
|
id: "USDT",
|
2454
2448
|
name: "USDT",
|
2455
2449
|
description: "Tether USD",
|
2456
|
-
logo: "
|
2450
|
+
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSj0euZAOXsLTJFQxgiKzlX7z8xbfBk-7kmJA&s"
|
2457
2451
|
},
|
2458
2452
|
{
|
2459
2453
|
id: "USDC",
|
2460
2454
|
name: "USDC",
|
2461
2455
|
description: "USD Coin",
|
2462
|
-
logo: "
|
2456
|
+
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ43MuDqq54iD1ZCRL_uthAPkfwSSL-J5qI_Q&s"
|
2463
2457
|
},
|
2464
2458
|
{
|
2465
2459
|
id: "BNB",
|
2466
2460
|
name: "BNB",
|
2467
2461
|
description: "Binance Coin",
|
2468
|
-
logo: "
|
2462
|
+
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHSjyW2sSnBhwztCwVW97i1BtV40g7heMMxg&s"
|
2469
2463
|
},
|
2470
2464
|
{
|
2471
2465
|
id: "SOL",
|
2472
2466
|
name: "SOL",
|
2473
2467
|
description: "Solana",
|
2474
|
-
logo: "
|
2468
|
+
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTsIsJL3zRgUrkD3yE3lD7LK0wZWSiRyY1GVg&s"
|
2475
2469
|
}
|
2476
2470
|
];
|
2477
2471
|
const handleSelectPaymentMethod = (id) => {
|
@@ -2483,7 +2477,7 @@ const PaymentMethods = ({ onSelect, selected, theme = "light" }) => {
|
|
2483
2477
|
"button",
|
2484
2478
|
{
|
2485
2479
|
onClick: () => handleSelectPaymentMethod(method.id),
|
2486
|
-
className: `w-full flex items-center p-3 rounded-lg transition-colors ${selected === method.id ? theme === "dark" ? "bg-blue-900/30 border border-
|
2480
|
+
className: `w-full flex items-center p-3 rounded-lg transition-colors ${selected === method.id ? theme === "dark" ? "bg-blue-900/30 border-2 border-[#7042D2]" : "bg-blue-50 border-2 border-[#7042D2]" : theme === "dark" ? "bg-gray-700 hover:bg-gray-600 border border-gray-700" : "bg-white hover:bg-gray-50 border border-gray-200"}`,
|
2487
2481
|
children: [
|
2488
2482
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 h-10 w-10 bg-white rounded-full flex items-center justify-center mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: method.logo, alt: method.name, className: "h-6 w-6" }) }),
|
2489
2483
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 text-left", children: [
|
@@ -2494,7 +2488,7 @@ const PaymentMethods = ({ onSelect, selected, theme = "light" }) => {
|
|
2494
2488
|
"svg",
|
2495
2489
|
{
|
2496
2490
|
xmlns: "http://www.w3.org/2000/svg",
|
2497
|
-
className: "h-5 w-5 text-
|
2491
|
+
className: "h-5 w-5 text-[#7042D2]",
|
2498
2492
|
viewBox: "0 0 20 20",
|
2499
2493
|
fill: "currentColor",
|
2500
2494
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -2513,7 +2507,7 @@ const PaymentMethods = ({ onSelect, selected, theme = "light" }) => {
|
|
2513
2507
|
)) })
|
2514
2508
|
] });
|
2515
2509
|
};
|
2516
|
-
const
|
2510
|
+
const logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJQAAAAkCAYAAABv9hOhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAmVSURBVHgB7Vzdcdu4Fv5I+X2VCoK83pkb2xVc2ikgTgVWKog8twDJBexYrsBKBXYKWJtbQWRnZl+NrWC172txcQBQBA8B/kiKV87qm4FFgMAhAX48ODg4dISOGB4/XKsfObl9e+Y9n3wViHt3QHY5ud2fYId1caDSJyc/V+kMW4q4S2VFFurcCR0Oj+/H3kq9vSv1VyDDKX5s0Fh8VSlTifrcx/cByR046QRbjE6EQmnQok9aGzlQ+QRZluDHh1BJaWFNKsJApQvs0JlQc+e4jzgelqX1HNUcz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VC9f0vdR7Of1PfVCTtQxwubBITwxXCW3gUOmfpBMeTSmiXU6QRwnVtSJzke9q6Lu4oOdMsd6Fbka6G0KkVEgbGQTQdztkxThuG8a6ARhMlG7bZvuctB9+cZHwH5DCaOFEvjJdIQwuAbMMUMgINAfD8UD41yo6dHaRgNb0reSzK+aFvNwYU1QIpWJOliHVGNU96DqkML/Bk3RLf6b6h2hvWf9n8IY9XucPhARDxva+FwIhMtQg0rEJiNLGSZI7lyvDMsXhbG1LKLeMvTBTodH9vN0IhVWnP6mNg1gDOaEnc+N+DxsIwQJQ6qBlcOnAZJDRPyMeiJ9QflhSHbuJyazCVze3JE79ZRzpCj6RY7pBH6NRNe5QfvVqgxcy4uIF5hPzCO/JlG2k44pP36g8Ip+qYyM78yZyxdPr1w3g/5yJoqv9apSGfuTX95uYgoRzrHE6hAbkrNtcG3LOVZzhnLbboqaT8aqU17mnermS+KY6Yzv5QBP7LOoOB64WR2MRxGgWsvhakNed+mkbZCzbSACSVR9Vm3BXQWEz3UNqoSquhCmJtTXbg4vjXDQFDjLtZD+pUjPQtA+F0021eRu/40NKz7ADtuMkB8urWtU/Yzq9u1UaQ+pow0WTzdV77hDlGgZgmuQLdT8HBmi1Hjfl3HnO2wbEhT2qWDniAeNIdD+z6jqQlXcuHL6MMHFYpEuDfYo2sSUtsPzQiDs6CQySTQgRldkWU6UKf+KRROxOaR4h5cF0kzk+pm2qdydUJF2D8yXH3NyPP21tf9dbYdOkDAOU3JFtF6R76EraO9PrfJC39hZv5NidG835b085Eb3qi4G/A2inrQKnVgMFAAAAABJRU5ErkJggg==";
|
2517
2511
|
const CoinleyModal = (props) => {
|
2518
2512
|
const {
|
2519
2513
|
isOpen,
|
@@ -2575,14 +2569,17 @@ const CoinleyModal = (props) => {
|
|
2575
2569
|
return hash;
|
2576
2570
|
return `${hash.slice(0, 8)}...${hash.slice(-6)}`;
|
2577
2571
|
};
|
2572
|
+
const getWalletAddressForCurrency = () => {
|
2573
|
+
if (!payment)
|
2574
|
+
return null;
|
2575
|
+
const isSolana = selectedCurrency === "SOL" || selectedCurrency === "USDC_SOL";
|
2576
|
+
return isSolana ? payment.solWalletAddress : payment.walletAddress;
|
2577
|
+
};
|
2578
2578
|
if (!isOpen)
|
2579
2579
|
return null;
|
2580
2580
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 overflow-y-auto bg-black/50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-h-screen items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative p-6 w-full max-w-md mx-auto rounded-lg shadow-xl bg-white text-gray-800", children: [
|
2581
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mb-6", children: [
|
2582
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
2583
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: Logo, alt: "Coinley Logo", className: "h-8 mr-2" }),
|
2584
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold text-gray-900", children: "Coinley Pay" })
|
2585
|
-
] }),
|
2581
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mb-6 bg-[#F1ECFB] p-3 rounded-xl", children: [
|
2582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold text-gray-900", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logo, className: "w-32" }) }) }),
|
2586
2583
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
2587
2584
|
"button",
|
2588
2585
|
{
|
@@ -2592,12 +2589,15 @@ const CoinleyModal = (props) => {
|
|
2592
2589
|
}
|
2593
2590
|
)
|
2594
2591
|
] }),
|
2595
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
|
2596
|
-
payment && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6 p-4 rounded-lg
|
2597
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
2598
|
-
|
2592
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6 bg-[#F1ECFB] p-3 rounded-xl", children: [
|
2593
|
+
payment && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6 p-4 rounded-lg", children: [
|
2594
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-lg text-gray-800 font-semibold", children: [
|
2595
|
+
"PAY: ",
|
2596
|
+
merchantName
|
2597
|
+
] }),
|
2598
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mt-2 bg-gray-100 px-3 rounded-lg", children: [
|
2599
2599
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium text-gray-700", children: "Amount:" }),
|
2600
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-bold text-xl", children: [
|
2600
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-bold text-xl text-[#7042D2]", children: [
|
2601
2601
|
"$",
|
2602
2602
|
formatAmount(payment.totalAmount || payment.amount)
|
2603
2603
|
] })
|
@@ -2621,15 +2621,15 @@ const CoinleyModal = (props) => {
|
|
2621
2621
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-medium mb-2 text-gray-800", children: "Payment Details" }),
|
2622
2622
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
2623
2623
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
2624
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
2624
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[#7042D2] font-semibold", children: "Currency:" }),
|
2625
2625
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: selectedCurrency })
|
2626
2626
|
] }),
|
2627
2627
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
2628
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
2628
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[#7042D2] font-semibold", children: "Network:" }),
|
2629
2629
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: selectedCurrency === "SOL" || selectedCurrency === "USDC_SOL" ? "Solana" : "Ethereum" })
|
2630
2630
|
] }),
|
2631
2631
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
2632
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
2632
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[#7042D2] font-semibold", children: "Fee:" }),
|
2633
2633
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: "1.75%" })
|
2634
2634
|
] })
|
2635
2635
|
] })
|
@@ -2639,7 +2639,7 @@ const CoinleyModal = (props) => {
|
|
2639
2639
|
"button",
|
2640
2640
|
{
|
2641
2641
|
onClick: () => togglePaymentMethod("wallet"),
|
2642
|
-
className: `py-2 px-4 text-sm font-medium ${paymentMethod === "wallet" ? "
|
2642
|
+
className: `py-2 px-4 text-sm font-medium ${paymentMethod === "wallet" ? "border-b border-[#7042D2] text-[#7042D2] rounded-t-md" : "text-[#7042D2]"}`,
|
2643
2643
|
children: "Connect Wallet"
|
2644
2644
|
}
|
2645
2645
|
),
|
@@ -2647,7 +2647,7 @@ const CoinleyModal = (props) => {
|
|
2647
2647
|
"button",
|
2648
2648
|
{
|
2649
2649
|
onClick: () => togglePaymentMethod("qrcode"),
|
2650
|
-
className: `py-2 px-4 text-sm font-medium ${paymentMethod === "qrcode" ? "
|
2650
|
+
className: `py-2 px-4 text-sm font-medium ${paymentMethod === "qrcode" ? "border-b border-[#7042D2] text-[#7042D2] rounded-t-md" : "text-[#7042D2]"}`,
|
2651
2651
|
children: "QR Code"
|
2652
2652
|
}
|
2653
2653
|
)
|
@@ -2655,7 +2655,7 @@ const CoinleyModal = (props) => {
|
|
2655
2655
|
testMode ? (
|
2656
2656
|
// Test mode payment option
|
2657
2657
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg mb-4 bg-blue-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
2658
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-
|
2658
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-[#7042D2] rounded-full p-2 mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) }),
|
2659
2659
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
2660
2660
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-gray-800", children: "Test Mode Payment" }),
|
2661
2661
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-600", children: 'Click "Pay Now" to simulate a successful payment' })
|
@@ -2666,7 +2666,7 @@ const CoinleyModal = (props) => {
|
|
2666
2666
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg mb-4 bg-blue-50", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
2667
2667
|
QRCode,
|
2668
2668
|
{
|
2669
|
-
walletAddress:
|
2669
|
+
walletAddress: getWalletAddressForCurrency(),
|
2670
2670
|
amount: payment.totalAmount || payment.amount,
|
2671
2671
|
currency: selectedCurrency,
|
2672
2672
|
theme
|
@@ -2693,7 +2693,7 @@ const CoinleyModal = (props) => {
|
|
2693
2693
|
"button",
|
2694
2694
|
{
|
2695
2695
|
onClick: onConnectWallet,
|
2696
|
-
className: "mt-3 w-full py-2 px-4 bg-
|
2696
|
+
className: "mt-3 w-full py-2 px-4 bg-[#7042D2] hover:bg-[#7042D2] text-white font-medium rounded-md",
|
2697
2697
|
children: "Connect Wallet"
|
2698
2698
|
}
|
2699
2699
|
)
|
@@ -2714,7 +2714,7 @@ const CoinleyModal = (props) => {
|
|
2714
2714
|
href: "https://metamask.io/download/",
|
2715
2715
|
target: "_blank",
|
2716
2716
|
rel: "noopener noreferrer",
|
2717
|
-
className: "block mt-3 text-center w-full py-2 px-4 bg-
|
2717
|
+
className: "block mt-3 text-center w-full py-2 px-4 bg-[#7042D2] hover:bg-[#7042D2] text-white font-medium rounded-md",
|
2718
2718
|
children: "Install MetaMask"
|
2719
2719
|
}
|
2720
2720
|
)
|
@@ -2726,7 +2726,7 @@ const CoinleyModal = (props) => {
|
|
2726
2726
|
{
|
2727
2727
|
type: "button",
|
2728
2728
|
onClick: handleBack,
|
2729
|
-
className: "w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-
|
2729
|
+
className: "w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-[#7042D2] font-medium rounded-md",
|
2730
2730
|
children: "Back"
|
2731
2731
|
}
|
2732
2732
|
),
|
@@ -2735,9 +2735,9 @@ const CoinleyModal = (props) => {
|
|
2735
2735
|
{
|
2736
2736
|
type: "button",
|
2737
2737
|
onClick: handlePaymentConfirm,
|
2738
|
-
className: "w-full py-2 px-4 bg-
|
2738
|
+
className: "w-full py-2 px-4 bg-[#7042D2] hover:bg-[#7042D2] text-white font-medium rounded-md",
|
2739
2739
|
disabled: !testMode && paymentMethod === "wallet" && isMetaMaskAvailable && !walletConnected,
|
2740
|
-
children: "
|
2740
|
+
children: "Proceed"
|
2741
2741
|
}
|
2742
2742
|
)
|
2743
2743
|
] })
|
@@ -2768,7 +2768,7 @@ const CoinleyModal = (props) => {
|
|
2768
2768
|
href: `https://etherscan.io/tx/${transactionHash}`,
|
2769
2769
|
target: "_blank",
|
2770
2770
|
rel: "noopener noreferrer",
|
2771
|
-
className: "text-xs text-
|
2771
|
+
className: "text-xs text-[#7042D2] mt-2 inline-block",
|
2772
2772
|
children: "View on Etherscan →"
|
2773
2773
|
}
|
2774
2774
|
)
|
@@ -2794,7 +2794,11 @@ const CoinleyModal = (props) => {
|
|
2794
2794
|
)
|
2795
2795
|
] })
|
2796
2796
|
] }),
|
2797
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center text-xs text-gray-500", children: /* @__PURE__ */ jsxRuntimeExports.
|
2797
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center text-xs text-gray-500", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
|
2798
|
+
"Powered by ",
|
2799
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[#7042D2]", children: "Coinley" }),
|
2800
|
+
" - Secure Cryptocurrency Payments"
|
2801
|
+
] }) })
|
2798
2802
|
] }) }) });
|
2799
2803
|
};
|
2800
2804
|
const CoinleyCheckout = forwardRef(({
|
@@ -2999,7 +3003,10 @@ const CoinleyCheckout = forwardRef(({
|
|
2999
3003
|
}
|
3000
3004
|
}
|
3001
3005
|
const isSolana = selectedCurrency === "SOL" || selectedCurrency === "USDC_SOL";
|
3002
|
-
const merchantAddress = isSolana ? payment.solWalletAddress || effectiveSolWalletAddress
|
3006
|
+
const merchantAddress = isSolana ? payment.solWalletAddress || effectiveSolWalletAddress : payment.walletAddress || effectiveWalletAddress;
|
3007
|
+
if (!merchantAddress) {
|
3008
|
+
throw new Error(`No ${isSolana ? "Solana" : "Ethereum"} wallet address is configured for the merchant. Please contact support.`);
|
3009
|
+
}
|
3003
3010
|
const txParams = {
|
3004
3011
|
from: await window.ethereum.request({ method: "eth_requestAccounts" }).then((accounts) => accounts[0]),
|
3005
3012
|
to: merchantAddress,
|
@@ -3067,7 +3074,7 @@ const DEFAULT_CONFIG = {
|
|
3067
3074
|
testMode: false,
|
3068
3075
|
theme: "light"
|
3069
3076
|
};
|
3070
|
-
const VERSION = "0.2.
|
3077
|
+
const VERSION = "0.2.8";
|
3071
3078
|
export {
|
3072
3079
|
CoinleyCheckout,
|
3073
3080
|
CoinleyModal,
|