From fc8e74b7b0665841486bcad3b1f008a0d864cd16 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Tue, 27 Nov 2018 15:15:38 +0100 Subject: [PATCH] fix(wallet): increase invoice fetch count to 1000 By default, lnd only returns the latest 100 invoices. Ideally we would implement pagination, but until then here is a quick fix to increase the max number of invoices returned by lnd to 1000. Fix #911 --- app/lib/lnd/methods/invoicesController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/lnd/methods/invoicesController.js b/app/lib/lnd/methods/invoicesController.js index 8bce8a3d..b3adb432 100644 --- a/app/lib/lnd/methods/invoicesController.js +++ b/app/lib/lnd/methods/invoicesController.js @@ -26,7 +26,7 @@ export function addInvoice(lnd, { memo, value, private: privateInvoice }) { */ export function listInvoices(lnd) { return new Promise((resolve, reject) => { - lnd.listInvoices({}, (err, data) => { + lnd.listInvoices({ num_max_invoices: 1000 }, (err, data) => { if (err) { return reject(err) }