mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
Hex encoding
This commit is contained in:
parent
7d1ed230ac
commit
95b7b2cae2
@ -59,6 +59,7 @@ export default async function handler(req, res) {
|
|||||||
|
|
||||||
const invoice = response.data.payment_request;
|
const invoice = response.data.payment_request;
|
||||||
const paymentHash = response.data.r_hash;
|
const paymentHash = response.data.r_hash;
|
||||||
|
const paymentHashHex = paymentHash.toString('hex');
|
||||||
|
|
||||||
// If this is a zap, publish a zap receipt
|
// If this is a zap, publish a zap receipt
|
||||||
if (zap_request && foundAddress.allowsNostr) {
|
if (zap_request && foundAddress.allowsNostr) {
|
||||||
@ -85,7 +86,7 @@ export default async function handler(req, res) {
|
|||||||
console.log("ZAP RECEIPT PUBLISHED", signedZapReceipt);
|
console.log("ZAP RECEIPT PUBLISHED", signedZapReceipt);
|
||||||
}
|
}
|
||||||
|
|
||||||
res.status(200).json({ invoice, payment_hash: paymentHash });
|
res.status(200).json({ invoice, payment_hash: paymentHashHex });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error (server) fetching data from LND:', error.message);
|
console.error('Error (server) fetching data from LND:', error.message);
|
||||||
res.status(500).json({ message: 'Error fetching data' });
|
res.status(500).json({ message: 'Error fetching data' });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user