Skip to content

Commit

Permalink
lowercase the bolt11 invoice before decoding since Zeus generates upp…
Browse files Browse the repository at this point in the history
…ercase invoices
  • Loading branch information
frnandu committed Dec 24, 2023
1 parent 9ec50cd commit 34c3756
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion handle_lookup_invoice_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"strings"

"github.com/nbd-wtf/go-nostr"
decodepay "github.com/nbd-wtf/ln-decodepay"
Expand Down Expand Up @@ -64,7 +65,7 @@ func (svc *Service) HandleLookupInvoiceEvent(ctx context.Context, request *Nip47
paymentHash := lookupInvoiceParams.PaymentHash

if paymentHash == "" {
paymentRequest, err := decodepay.Decodepay(lookupInvoiceParams.Invoice)
paymentRequest, err := decodepay.Decodepay(strings.ToLower(lookupInvoiceParams.Invoice))
if err != nil {
svc.Logger.WithFields(logrus.Fields{
"eventId": event.ID,
Expand Down

0 comments on commit 34c3756

Please sign in to comment.