coinley-checkout 0.7.8 → 0.7.9
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.
@@ -20604,25 +20604,12 @@ const QRCode = ({
|
|
20604
20604
|
const amountFloat = parseFloat(amount2);
|
20605
20605
|
if (currency2 === "ALGO") {
|
20606
20606
|
const microAlgos = Math.floor(amountFloat * 1e6);
|
20607
|
-
|
20608
|
-
receiver: address,
|
20609
|
-
amount: microAlgos,
|
20610
|
-
note: btoa("Payment via Coinley")
|
20611
|
-
// Base64 encoded note
|
20612
|
-
};
|
20613
|
-
return `algorand://pay?receiver=${peraPayment.receiver}&amount=${peraPayment.amount}¬e=${peraPayment.note}`;
|
20607
|
+
return `algorand://${address}?amount=${microAlgos}¬e=${encodeURIComponent("Payment via Coinley")}`;
|
20614
20608
|
} else {
|
20615
20609
|
const tokenConfig = getTokenConfigForCurrency(currency2, "algorand");
|
20616
20610
|
if (tokenConfig && tokenConfig.assetId) {
|
20617
20611
|
const assetAmount = Math.floor(amountFloat * Math.pow(10, tokenConfig.decimals));
|
20618
|
-
|
20619
|
-
receiver: address,
|
20620
|
-
amount: assetAmount,
|
20621
|
-
assetId: tokenConfig.assetId,
|
20622
|
-
note: btoa(`${currency2} Payment via Coinley`)
|
20623
|
-
// Base64 encoded note
|
20624
|
-
};
|
20625
|
-
return `algorand://pay?receiver=${peraAssetPayment.receiver}&amount=${peraAssetPayment.amount}&asset=${peraAssetPayment.assetId}¬e=${peraAssetPayment.note}`;
|
20612
|
+
return `algorand://${address}?amount=${assetAmount}&asset=${tokenConfig.assetId}¬e=${encodeURIComponent(currency2 + " Payment via Coinley")}`;
|
20626
20613
|
} else {
|
20627
20614
|
console.warn(`Token config not found for ${currency2} on Algorand`);
|
20628
20615
|
return address;
|