Skip to content

Commit 1ed0619

Browse files
committed
f - fix/update pay_for_offer docs
1 parent 0a4f230 commit 1ed0619

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

0 commit comments

Comments
 (0)