Fix expiry greater than maxExpiry

This commit is contained in:
ekzyis 2023-09-09 22:52:51 +02:00
parent 6c111501ec
commit b4a8adcb9a
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ func (lnd *LndClient) CreateInvoice(pubkey string, msats int) (*Invoice, error)
paymentRequest, err := lnd.Invoices.AddHoldInvoice(context.TODO(), &invoicesrpc.AddInvoiceData{ paymentRequest, err := lnd.Invoices.AddHoldInvoice(context.TODO(), &invoicesrpc.AddInvoiceData{
Hash: &hash, Hash: &hash,
Value: lnwire.MilliSatoshi(msats), Value: lnwire.MilliSatoshi(msats),
Expiry: int64(expiry), Expiry: int64(expiry / time.Millisecond),
}) })
if err != nil { if err != nil {
return nil, err return nil, err