coinley-checkout 0.2.0 → 0.2.2

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.
@@ -1106,53 +1106,26 @@ const CoinleyProvider = ({
1106
1106
  };
1107
1107
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CoinleyContext.Provider, { value, children });
1108
1108
  };
1109
- const QRCode = ({
1110
- walletAddress,
1111
- amount,
1112
- currency,
1113
- theme = "light"
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]);
1121
- 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(
1109
+ const QRCode = ({ walletAddress, amount, currency }) => {
1110
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1111
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1123
1112
  "img",
1124
1113
  {
1125
- src: qrCodeUrl,
1126
- alt: `QR Code for ${currency} payment`,
1127
- style: { width: "200px", height: "200px" }
1114
+ src: `https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=Payment%20to%20${walletAddress}&choe=UTF-8`,
1115
+ alt: "Payment QR Code",
1116
+ style: { width: 200, height: 200, margin: "0 auto", display: "block" }
1128
1117
  }
1129
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "200px", height: "200px", background: "#f0f0f0", display: "flex", alignItems: "center", justifyContent: "center" }, children: "Wallet address missing" }) }),
1130
- /* @__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: [
1132
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500 mb-1", children: [
1133
- "Send ",
1134
- amount,
1135
- " ",
1136
- currency,
1137
- " to:"
1138
- ] }),
1139
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-mono p-2 rounded overflow-auto break-all bg-gray-100 text-gray-700", children: walletAddress })
1118
+ ),
1119
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { style: { textAlign: "center", marginTop: 10 }, children: [
1120
+ "Scan to pay ",
1121
+ amount,
1122
+ " ",
1123
+ currency
1140
1124
  ] }),
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
- ] }) })
1125
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { style: { marginTop: 10 }, children: [
1126
+ "Send to: ",
1127
+ walletAddress
1128
+ ] })
1156
1129
  ] });
1157
1130
  };
1158
1131
  const PaymentStatus = ({ status, message, theme = "light" }) => {