Skip to content

Commit 8978d40

Browse files
committed
f - fix/update pay_for_offer docs
1 parent 9fad0d8 commit 8978d40

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
@@ -7144,18 +7144,22 @@ where
71447144
/// Uses [`InvoiceRequestBuilder`] such that the [`InvoiceRequest`] it builds is recognized by
71457145
/// the [`ChannelManager`] when handling a [`Bolt12Invoice`] message for the request. The
71467146
/// optional parameters are used in the builder, if `Some`:
7147-
/// - `quantity` for [`InvoiceRequest::quantity`] which may be set if
7147+
/// - `quantity` for [`InvoiceRequest::quantity`] which must be set if
71487148
/// [`Offer::expects_quantity`] is `true`.
71497149
/// - `amount_msats` if overpaying what is required for the given `quantity` is desired, and
71507150
/// - `payer_note` for [`InvoiceRequest::payer_note`].
71517151
///
7152-
/// The provided `payment_id` is used to ensure that only one invoice is paid for the request.
7152+
/// The provided `payment_id` is used to ensure that only one invoice is paid for the request
7153+
/// when received. See [Avoiding Duplicate Payments] for other requirements once the payment has
7154+
/// been sent. Errors if a duplicate `payment_id` is provided given the caveats in the
7155+
/// aforementioned link.
71537156
///
71547157
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
71557158
/// [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
71567159
/// [`InvoiceRequest::payer_note`]: crate::offers::invoice_request::InvoiceRequest::payer_note
71577160
/// [`InvoiceRequestBuilder`]: crate::offers::invoice_request::InvoiceRequestBuilder
71587161
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
7162+
/// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
71597163
pub fn pay_for_offer(
71607164
&self, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
71617165
payer_note: Option<String>, payment_id: PaymentId, retry_strategy: Retry,

0 commit comments

Comments
 (0)