Fix for encoding

This commit is contained in:
austinkelsay 2024-11-06 17:00:28 -06:00
parent ff4b9d8ac9
commit baac9ee21c
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02

View File

@ -21,13 +21,9 @@ export default async function handler(req, res) {
return;
}
// Convert hex payment hash to base64
const paymentHashBuffer = Buffer.from(slug, 'hex');
const paymentHashBase64 = paymentHashBuffer.toString('base64');
// Call LND to check payment status
const response = await axios.get(
`https://${foundAddress.lndHost}/v1/invoice/${paymentHashBase64}`,
`https://${foundAddress.lndHost}/v1/invoice/${slug}`,
{
headers: {
'Grpc-Metadata-macaroon': foundAddress.invoiceMacaroon,