Skip to content

Commit

Permalink
fix: breez payment type check
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jan 30, 2024
1 parent b4d409b commit b2ce61c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion breez.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ func (bs *BreezService) ListTransactions(ctx context.Context, senderPubkey strin

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

transaction := breezPaymentToTransaction(&payment)

transactions = append(transactions, *transaction)
Expand All @@ -209,7 +214,7 @@ func breezPaymentToTransaction(payment *breez_sdk.Payment) *Nip47Transaction {
var txType string
if payment.PaymentType == breez_sdk.PaymentTypeSent {
txType = "outgoing"
} else if payment.PaymentType == breez_sdk.PaymentTypeSent {
} else {
txType = "incoming"
}

Expand Down

0 comments on commit b2ce61c

Please sign in to comment.