LndHub icon indicating copy to clipboard operation
LndHub copied to clipboard

Feature request: LN wallet: Option to hide pending/expired invoices

Open Tigerix opened this issue 4 years ago • 5 comments

Usually I just want to see my transaction history - meaning that I am not interessted in seeing pending or old expired invoices. It would be great to have an option to hide either of those.

Tigerix avatar Jun 15 '20 11:06 Tigerix

the simplest way to do this would be to just not return unpaid invoices if they are older than 4 weeks. no option needed

Overtorment avatar May 14 '21 10:05 Overtorment

maybe one could install a middleware in api.js that would redirect /getuserinvoices to a LndHub-Admin component that filters out by parameters set

instead of make changes to LndHub internals just reroute from middleware, one middleware function (req, req, next) that from config.js have a array of URL endpoints one is interested in rerouting.

would mean minimal changes to LndHub and in turn deliver great flexibility

if LndHub is running behind a server such as nginx then one could reroute there to a LndHub-Admin /getuserinvoices function that would return desired filters

I would recommend running LndHub behind a reverse proxy server anyway, so that would be how ?

lndhub-admin avatar Jul 11 '21 01:07 lndhub-admin

i think 4 weeks old unpaid invoices are not returned via API. not 100% sure

Overtorment avatar Jul 11 '21 12:07 Overtorment

yeah its set to

await this._redis.expire(key, 3600 * 24 * 30); // 1 month

lndhub-admin avatar Jul 11 '21 14:07 lndhub-admin

and create invoice is set at valid one day ?

expiry: 3600 * 24,

lndhub-admin avatar Jul 11 '21 16:07 lndhub-admin