From 2e5f411cf1f4c3ea13d96daa509b17afcd2c97d3 Mon Sep 17 00:00:00 2001 From: Stefan Kostic Date: Thu, 17 Feb 2022 15:17:05 +0100 Subject: [PATCH] Use context background on all needed places --- lib/service/invoices.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/service/invoices.go b/lib/service/invoices.go index 0b33a44..85eed14 100644 --- a/lib/service/invoices.go +++ b/lib/service/invoices.go @@ -174,7 +174,7 @@ func (svc *LndhubService) PayInvoice(ctx context.Context, invoice *models.Invoic if svc.IdentityPubkey == invoice.DestinationPubkeyHex { paymentResponse, err = svc.SendInternalPayment(context.Background(), invoice) if err != nil { - svc.HandleFailedPayment(ctx, invoice, entry, err) + svc.HandleFailedPayment(context.Background(), invoice, entry, err) return nil, err } } else { @@ -189,7 +189,7 @@ func (svc *LndhubService) PayInvoice(ctx context.Context, invoice *models.Invoic // The payment was successful. invoice.Preimage = paymentResponse.PaymentPreimageStr - err = svc.HandleSuccessfulPayment(ctx, invoice) + err = svc.HandleSuccessfulPayment(context.Background(), invoice) return &paymentResponse, err }