coinley-pay 0.0.11 → 0.0.12

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/index.esm.js CHANGED
@@ -47576,37 +47576,40 @@ const RedesignedCoinleyPaymentInternal = ({
47576
47576
  selectedNetwork && availableTokens.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
47577
47577
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-1", children: "Choose a token" }),
47578
47578
  /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-400 mb-4", children: "Select an option from these available tokens" }),
47579
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: availableTokens.map((token) => /* @__PURE__ */ jsxs(
47580
- "button",
47581
- {
47582
- onClick: () => handleTokenSelect(token),
47583
- className: `flex items-center gap-3 p-3 rounded-xl border-2 transition-all ${(selectedToken == null ? void 0 : selectedToken.id) === token.id ? "border-[#7042D2] bg-purple-50" : "border-gray-100 hover:border-[#7042D2] hover:bg-purple-50"}`,
47584
- children: [
47585
- /* @__PURE__ */ jsx(
47586
- "img",
47587
- {
47588
- src: getTokenLogoUrl(token.symbol),
47589
- alt: token.symbol,
47590
- className: "w-4 h-4 rounded-full",
47591
- onError: (e) => {
47592
- e.target.src = `https://ui-avatars.com/api/?name=${token.symbol}&background=7042D2&color=fff`;
47579
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: availableTokens.map((token) => {
47580
+ var _a2;
47581
+ return /* @__PURE__ */ jsxs(
47582
+ "button",
47583
+ {
47584
+ onClick: () => handleTokenSelect(token),
47585
+ className: `flex items-center gap-3 p-3 rounded-xl border-2 transition-all ${(selectedToken == null ? void 0 : selectedToken.id) === token.id ? "border-[#7042D2] bg-purple-50" : "border-gray-100 hover:border-[#7042D2] hover:bg-purple-50"}`,
47586
+ children: [
47587
+ /* @__PURE__ */ jsx(
47588
+ "img",
47589
+ {
47590
+ src: getTokenLogoUrl(token.symbol),
47591
+ alt: token.symbol,
47592
+ className: "w-4 h-4 rounded-full",
47593
+ onError: (e) => {
47594
+ e.target.src = `https://ui-avatars.com/api/?name=${token.symbol}&background=7042D2&color=fff`;
47595
+ }
47593
47596
  }
47594
- }
47595
- ),
47596
- /* @__PURE__ */ jsxs("div", { className: "text-left", children: [
47597
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
47598
- /* @__PURE__ */ jsx("p", { className: "font-medium text-xs text-gray-900", children: token.name || token.symbol }),
47599
- token.isStablecoin && /* @__PURE__ */ jsxs("span", { className: "text-xs text-green-600 flex items-center gap-1", children: [
47600
- /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 bg-green-500 rounded-full" }),
47601
- "Stablecoin"
47602
- ] })
47603
- ] }),
47604
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400", children: truncateAddress(token.contractAddress || token.address) })
47605
- ] })
47606
- ]
47607
- },
47608
- token.id
47609
- )) })
47597
+ ),
47598
+ /* @__PURE__ */ jsxs("div", { className: "text-left", children: [
47599
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
47600
+ /* @__PURE__ */ jsx("p", { className: "font-medium text-xs text-gray-900", children: token.name || token.symbol }),
47601
+ token.isStablecoin && /* @__PURE__ */ jsxs("span", { className: "text-xs text-green-600 flex items-center gap-1", children: [
47602
+ /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 bg-green-500 rounded-full" }),
47603
+ "Stablecoin"
47604
+ ] })
47605
+ ] }),
47606
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400", children: truncateAddress(((_a2 = config == null ? void 0 : config.merchantWalletAddresses) == null ? void 0 : _a2[selectedNetwork == null ? void 0 : selectedNetwork.shortName]) || "N/A") })
47607
+ ] })
47608
+ ]
47609
+ },
47610
+ token.id
47611
+ );
47612
+ }) })
47610
47613
  ] }),
47611
47614
  /* @__PURE__ */ jsxs("div", { className: "flex gap-3 mt-6", children: [
47612
47615
  /* @__PURE__ */ jsx(
@@ -47670,20 +47673,6 @@ const RedesignedCoinleyPaymentInternal = ({
47670
47673
  formatAmount((paymentData == null ? void 0 : paymentData.productAmount) || (config == null ? void 0 : config.amount) || 0)
47671
47674
  ] })
47672
47675
  ] }),
47673
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
47674
- /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "Processing Fee" }),
47675
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
47676
- "+$",
47677
- formatAmount((paymentData == null ? void 0 : paymentData.platformFee) || 0)
47678
- ] })
47679
- ] }),
47680
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
47681
- /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "Network Fee" }),
47682
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
47683
- "+$",
47684
- formatAmount((paymentData == null ? void 0 : paymentData.networkFee) || 0)
47685
- ] })
47686
- ] }),
47687
47676
  /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-3 flex justify-between", children: [
47688
47677
  /* @__PURE__ */ jsx("span", { className: "font-semibold", children: "Total" }),
47689
47678
  /* @__PURE__ */ jsxs("span", { className: "font-bold text-lg", children: [
@@ -47966,13 +47955,6 @@ const RedesignedCoinleyPaymentInternal = ({
47966
47955
  selectedToken == null ? void 0 : selectedToken.symbol
47967
47956
  ] }) })
47968
47957
  ] }),
47969
- /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
47970
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-gray-700 mb-2", children: "Network Fee" }),
47971
- /* @__PURE__ */ jsx("div", { className: "p-4 bg-gray-50 rounded-xl border border-gray-200", children: /* @__PURE__ */ jsxs("span", { className: "text-lg font-semibold", children: [
47972
- "$",
47973
- formatAmount((paymentData == null ? void 0 : paymentData.networkFee) || 0.5)
47974
- ] }) })
47975
- ] }),
47976
47958
  /* @__PURE__ */ jsxs("div", { className: "bg-orange-50 border border-orange-200 rounded-xl p-4 flex items-start gap-3", children: [
47977
47959
  /* @__PURE__ */ jsx("svg", { className: "w-6 h-6 text-orange-500 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" }) }),
47978
47960
  /* @__PURE__ */ jsxs("div", { children: [