coinley-checkout 0.2.0 → 0.2.1

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.
@@ -1112,23 +1112,19 @@ const QRCode = ({
1112
1112
  currency,
1113
1113
  theme = "light"
1114
1114
  }) => {
1115
- const qrCodeUrl = require$$0.useMemo(() => {
1116
- if (!walletAddress)
1117
- return "";
1118
- const data = `${currency}:${walletAddress}?amount=${amount}&currency=${currency}`;
1119
- return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(data)}`;
1120
- }, [walletAddress, amount, currency]);
1115
+ const qrCodeUrl = `https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=${encodeURIComponent(`${currency}:${walletAddress}?amount=${amount}`)}&choe=UTF-8`;
1121
1116
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center", children: [
1122
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg bg-white mb-3", children: walletAddress ? /* @__PURE__ */ jsxRuntimeExports.jsx(
1117
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg bg-white mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1123
1118
  "img",
1124
1119
  {
1125
1120
  src: qrCodeUrl,
1126
1121
  alt: `QR Code for ${currency} payment`,
1127
- style: { width: "200px", height: "200px" }
1122
+ width: "200",
1123
+ height: "200"
1128
1124
  }
1129
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "200px", height: "200px", background: "#f0f0f0", display: "flex", alignItems: "center", justifyContent: "center" }, children: "Wallet address missing" }) }),
1125
+ ) }),
1130
1126
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center text-sm text-gray-700", children: "Scan with your wallet app to pay" }),
1131
- walletAddress && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 w-full", children: [
1127
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 w-full", children: [
1132
1128
  /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500 mb-1", children: [
1133
1129
  "Send ",
1134
1130
  amount,
@@ -1137,22 +1133,7 @@ const QRCode = ({
1137
1133
  " to:"
1138
1134
  ] }),
1139
1135
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-mono p-2 rounded overflow-auto break-all bg-gray-100 text-gray-700", children: walletAddress })
1140
- ] }),
1141
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-3 rounded bg-gray-100", children: [
1142
- /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium mb-2 text-gray-800", children: "Payment Instructions" }),
1143
- /* @__PURE__ */ jsxRuntimeExports.jsxs("ol", { className: "text-xs space-y-2 text-gray-600", children: [
1144
- /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "1. Open your crypto wallet app" }),
1145
- /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "2. Scan the QR code above" }),
1146
- /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
1147
- "3. Confirm the payment amount (",
1148
- amount,
1149
- " ",
1150
- currency,
1151
- ")"
1152
- ] }),
1153
- /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: '4. Click "Pay Now" button below after sending the payment' })
1154
- ] })
1155
- ] }) })
1136
+ ] })
1156
1137
  ] });
1157
1138
  };
1158
1139
  const PaymentStatus = ({ status, message, theme = "light" }) => {