Fix encoding from base64 to hex

This commit is contained in:
austinkelsay 2024-11-06 17:24:36 -06:00
parent 144d2c6ac7
commit 9588161abc
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02

View File

@ -58,9 +58,8 @@ export default async function handler(req, res) {
});
const invoice = response.data.payment_request;
const paymentHash = response.data.r_hash;
const paymentHash = Buffer.from(response.data.r_hash, 'base64');
const paymentHashHex = paymentHash.toString('hex');
console.log("PAYMENT HASH HEX", paymentHashHex);
// If this is a zap, publish a zap receipt
if (zap_request && foundAddress.allowsNostr) {