Skip to content

Commit

Permalink
load only first 100 transctions
Browse files Browse the repository at this point in the history
otherwise the NWC payload is too big
we need to add pagination later
  • Loading branch information
bumi committed Jan 30, 2024
1 parent 1b3f235 commit 3ca6b8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion breez.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ func (bs *BreezService) ListTransactions(ctx context.Context, senderPubkey strin
}

transactions = []Nip47Transaction{}
for _, payment := range payments {
paymentList := payments[0:100]
for _, payment := range paymentList {
if payment.PaymentType != breez_sdk.PaymentTypeReceived && payment.PaymentType != breez_sdk.PaymentTypeSent {
// skip other types of payments for now
continue
Expand Down

0 comments on commit 3ca6b8d

Please sign in to comment.