Skip to content

Commit 2508211

Browse files
committed
f - fix/update pay_for_offer docs
1 parent 5d5d9b1 commit 2508211

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6891,18 +6891,22 @@ where
68916891
/// Uses [`InvoiceRequestBuilder`] such that the [`InvoiceRequest`] it builds is recognized by
68926892
/// the [`ChannelManager`] when handling a [`Bolt12Invoice`] message for the request. The
68936893
/// optional parameters are used in the builder, if `Some`:
6894-
/// - `quantity` for [`InvoiceRequest::quantity`] which may be set if
6894+
/// - `quantity` for [`InvoiceRequest::quantity`] which must be set if
68956895
/// [`Offer::expects_quantity`] is `true`.
68966896
/// - `amount_msats` if overpaying what is required for the given `quantity` is desired, and
68976897
/// - `payer_note` for [`InvoiceRequest::payer_note`].
68986898
///
6899-
/// The provided `payment_id` is used to ensure that only one invoice is paid for the request.
6899+
/// The provided `payment_id` is used to ensure that only one invoice is paid for the request
6900+
/// when received. See [Avoiding Duplicate Payments] for other requirements once the payment has
6901+
/// been sent. Errors if a duplicate `payment_id` is provided given the caveats in the
6902+
/// aforementioned link.
69006903
///
69016904
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
69026905
/// [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
69036906
/// [`InvoiceRequest::payer_note`]: crate::offers::invoice_request::InvoiceRequest::payer_note
69046907
/// [`InvoiceRequestBuilder`]: crate::offers::invoice_request::InvoiceRequestBuilder
69056908
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
6909+
/// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
69066910
pub fn pay_for_offer(
69076911
&self, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
69086912
payer_note: Option<String>, payment_id: PaymentId, retry_strategy: Retry

0 commit comments

Comments
 (0)