Skip to content

Commit

Permalink
Merge pull request #437 from getAlby/fix/no-errored-invoices
Browse files Browse the repository at this point in the history
legacy endpoint: no errored invoices
  • Loading branch information
kiwiidb authored Dec 8, 2023
2 parents 786439b + 4e7d0de commit dbc5993
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/gettxs.ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dbc5993

Please sign in to comment.