Fix Missing Memo in LND Invoices Table

This commit is contained in:
ShahanaFarooqui 2026-02-09 16:36:40 -08:00
parent e8d5685948
commit d8e6bb1b68
2 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ const extractKeysendMessage = (invoice) => {
}
}
}
return '';
return invoice.memo || '';
};
export const invoiceLookup = (req, res, next) => {
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Invoice', msg: 'Getting Invoice Information..' });
@ -62,7 +62,7 @@ export const listInvoices = (req, res, next) => {
invoice.r_preimage = invoice.r_preimage ? Buffer.from(invoice.r_preimage, 'base64').toString('hex') : '';
invoice.r_hash = invoice.r_hash ? Buffer.from(invoice.r_hash, 'base64').toString('hex') : '';
invoice.description_hash = invoice.description_hash ? Buffer.from(invoice.description_hash, 'base64').toString('hex') : null;
invoice.memo = extractKeysendMessage(invoice) || '';
invoice.memo = extractKeysendMessage(invoice);
});
}
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Invoice', msg: 'Sorted Invoices List Received', data: body });