Store and return invoice memo
This commit is contained in:
parent
947c7f7056
commit
9b81cc6287
@ -363,7 +363,7 @@ export class User {
|
||||
}
|
||||
if (invoice.decoded) {
|
||||
invoice.timestamp = invoice.decoded.timestamp;
|
||||
invoice.memo = invoice.decoded.description;
|
||||
invoice.memo = invoice.memo || invoice.decoded.description;
|
||||
}
|
||||
if (invoice.payment_preimage) {
|
||||
invoice.payment_preimage = Buffer.from(invoice.payment_preimage, 'hex').toString('hex');
|
||||
|
@ -197,6 +197,7 @@ router.post('/addinvoice', postLimiter, async function (req, res) {
|
||||
async function (err, info) {
|
||||
if (err) return errorLnd(res);
|
||||
|
||||
info.memo = req.body.memo;
|
||||
info.pay_req = info.payment_request; // client backwards compatibility
|
||||
await u.saveUserInvoice(info);
|
||||
await invoice.savePreimage(r_preimage);
|
||||
|
Loading…
Reference in New Issue
Block a user