Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8056,7 +8056,13 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
return nil, fmt.Errorf("error validating invoice amount: %w",
err)
}

// We'll forward the invoice request to lnd, where we can only set one
// of the two values. Since we've calculated the amount in mSat (but the
// user might've set the satoshi value initially), we need to reset the
// value field.
iReq.ValueMsat = int64(invoiceAmtMsat)
iReq.Value = 0

// The last step is to create a hop hint that includes the fake SCID of
// the quote, alongside the channel's routing policy. We need to choose
Expand Down
Loading