From 71c239d432c3a618f4b5e8fbfabd94e9f6509c5d Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Mon, 28 Sep 2020 11:56:21 -0400 Subject: [PATCH] invoices boostrap at auth --- src/routes.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/routes.js b/src/routes.js index aa1e00ed..2a1b7182 100644 --- a/src/routes.js +++ b/src/routes.js @@ -695,7 +695,24 @@ module.exports = async ( alias, publicKey }, - follows: await GunGetters.Follows.currentFollows() + follows: await GunGetters.Follows.currentFollows(), + data: { + invoices: await Common.makePromise((res, rej) => { + lightning.listInvoices( + { + reversed: true, + num_max_invoices: 50 + }, + (err, lres) => { + if (err) { + rej(new Error(err.details)) + } else { + res(lres) + } + } + ) + }) + } }) return true