From d88ebf11d8c776b7c58330cfada4896e6c5abf2d Mon Sep 17 00:00:00 2001 From: kiwiidb Date: Tue, 15 Feb 2022 18:16:10 +0100 Subject: [PATCH] use the correct expiresAt timestamp --- lib/service/invoices.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service/invoices.go b/lib/service/invoices.go index 87a7b58..c69a55d 100644 --- a/lib/service/invoices.go +++ b/lib/service/invoices.go @@ -227,7 +227,7 @@ func (svc *LndhubService) AddOutgoingInvoice(ctx context.Context, userID int64, DestinationPubkeyHex: decodedInvoice.Destination, DescriptionHash: decodedInvoice.DescriptionHash, Memo: decodedInvoice.Description, - ExpiresAt: bun.NullTime{Time: time.Unix(decodedInvoice.Expiry, 0)}, + ExpiresAt: bun.NullTime{Time: time.Unix(decodedInvoice.Timestamp, 0).Add(time.Duration(decodedInvoice.Expiry))}, } // Save invoice