legacy endpoint: no errored invoices

This commit is contained in:
kiwiidb
2023-10-09 14:07:19 +02:00
parent d2d9b0372a
commit 4e7d0de7cc

View File

@@ -65,6 +65,10 @@ func (controller *GetTXSController) GetTXS(c echo.Context) error {
response := make([]OutgoingInvoice, len(invoices))
for i, invoice := range invoices {
//only return settled invoices
if invoice.State != common.InvoiceStateSettled {
continue
}
rhash, _ := lib.ToJavaScriptBuffer(invoice.RHash)
response[i] = OutgoingInvoice{
RHash: rhash,