Skip to content

Commit

Permalink
Merge pull request getAlby#198 from R3DRUN3/main
Browse files Browse the repository at this point in the history
fix(handle payment request): lowercase bolt11 invoice
  • Loading branch information
rolznz authored Dec 21, 2023
2 parents 01087c3 + 4196315 commit e3642fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handle_payment_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 @@ -36,6 +37,8 @@ func (svc *Service) HandlePayInvoiceEvent(ctx context.Context, request *Nip47Req
}

bolt11 = payParams.Invoice
// Convert invoice to lowercase string
bolt11 = strings.ToLower(bolt11)
paymentRequest, err := decodepay.Decodepay(bolt11)
if err != nil {
svc.Logger.WithFields(logrus.Fields{
Expand Down

0 comments on commit e3642fd

Please sign in to comment.