Skip to content

Commit

Permalink
fix(handle payment request): lowercase bolt11 invoice
Browse files Browse the repository at this point in the history
Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>
  • Loading branch information
R3DRUN3 committed Dec 20, 2023
1 parent 01087c3 commit 4196315
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 4196315

Please sign in to comment.