coinley-checkout 0.7.9 → 0.8.0

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.
@@ -20594,6 +20594,14 @@ const QRCode = ({
20594
20594
  }
20595
20595
  setQrData(paymentData);
20596
20596
  setQrError(null);
20597
+ console.log("=== QR CODE DEBUG ===");
20598
+ console.log("Network:", network);
20599
+ console.log("Currency:", currency);
20600
+ console.log("Amount:", amount);
20601
+ console.log("Wallet Address:", walletAddress);
20602
+ console.log("Generated QR Data:", paymentData);
20603
+ console.log("QR Data Length:", paymentData.length);
20604
+ console.log("=== END QR DEBUG ===");
20597
20605
  } catch (err) {
20598
20606
  console.error("Error generating QR code:", err);
20599
20607
  setQrError("Error generating payment QR code");
@@ -20601,15 +20609,18 @@ const QRCode = ({
20601
20609
  }, [walletAddress, amount, currency, network]);
20602
20610
  const generateAlgorandQR = (address, amount2, currency2) => {
20603
20611
  try {
20612
+ if (!address || address.includes("No wallet address")) {
20613
+ return address;
20614
+ }
20604
20615
  const amountFloat = parseFloat(amount2);
20605
20616
  if (currency2 === "ALGO") {
20606
20617
  const microAlgos = Math.floor(amountFloat * 1e6);
20607
- return `algorand://${address}?amount=${microAlgos}&note=${encodeURIComponent("Payment via Coinley")}`;
20618
+ return `algorand://${address}?amount=${microAlgos}`;
20608
20619
  } else {
20609
20620
  const tokenConfig = getTokenConfigForCurrency(currency2, "algorand");
20610
20621
  if (tokenConfig && tokenConfig.assetId) {
20611
20622
  const assetAmount = Math.floor(amountFloat * Math.pow(10, tokenConfig.decimals));
20612
- return `algorand://${address}?amount=${assetAmount}&asset=${tokenConfig.assetId}&note=${encodeURIComponent(currency2 + " Payment via Coinley")}`;
20623
+ return `algorand://${address}?amount=${assetAmount}&asset=${tokenConfig.assetId}`;
20613
20624
  } else {
20614
20625
  console.warn(`Token config not found for ${currency2} on Algorand`);
20615
20626
  return address;