LndHub
LndHub copied to clipboard
Feature request: LN wallet: Option to hide pending/expired invoices
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.
the simplest way to do this would be to just not return unpaid invoices if they are older than 4 weeks. no option needed
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 ?
i think 4 weeks old unpaid invoices are not returned via API. not 100% sure
yeah its set to
await this._redis.expire(key, 3600 * 24 * 30); // 1 month
and create invoice is set at valid one day ?
expiry: 3600 * 24,