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
|
-
|
1111
|
-
|
1112
|
-
currency,
|
1113
|
-
theme = "light"
|
1114
|
-
}) => {
|
1115
|
-
const qrCodeUrl = require$$0.useMemo(() => {
|
1116
|
-
if (!walletAddress)
|
1117
|
-
return "";
|
1118
|
-
const data = `${currency}:${walletAddress}?amount=${amount}¤cy=${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:
|
1126
|
-
alt:
|
1127
|
-
style: { width: "
|
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
|
-
)
|
1130
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
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.
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
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" }) => {
|