Skip to content

Commit

Permalink
fix: do not return failed LND payments in list_transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Dec 15, 2023
1 parent 1adb12f commit 8b30f59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ You can also contribute to our [bounty program](https://github.com/getAlby/light

`list_transactions`
- ⚠️ from and until in request not supported
- ⚠️ failed payments will not be returned

`multi_pay_invoice`

Expand Down Expand Up @@ -174,6 +175,7 @@ You can also contribute to our [bounty program](https://github.com/getAlby/light
`list_transactions`
- ⚠️ offset and unpaid in request not supported
- ⚠️ fees_paid in response not supported
- ⚠️ unsettled and failed transactions will not be returned

`multi_pay_invoice`

Expand Down
5 changes: 5 additions & 0 deletions lnd.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ func (svc *LNDService) ListTransactions(ctx context.Context, senderPubkey string
payments = outgoingResp.Payments
}
for _, payment := range payments {
if payment.Status == lnrpc.Payment_FAILED {
// don't return failed payments for now
// this will cause retrieved amount to be less than limit
continue
}
var paymentRequest decodepay.Bolt11
var expiresAt time.Time
var description string
Expand Down

0 comments on commit 8b30f59

Please sign in to comment.