Skip to content

Commit 05fc9fd

Browse files
committed
Update docs for amount_msats to handle currency cases
Improves documentation for the amount_msats method in  InvoiceRequestBuilder. The update describes the behavior when an Offer specifies a currency.
1 parent 560835c commit 05fc9fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lightning/src/offers/invoice_request.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ macro_rules! invoice_request_builder_methods { (
270270
/// Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
271271
/// not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
272272
///
273+
/// When the [`Offer`] specifies a currency, this method allows setting the `amount_msats` in the
274+
/// `InvoiceRequest`. The issuer of the offer will validate this amount and must set a matching
275+
/// amount in the final invoice. If the issuer disagrees with the specfified amount, the invoice
276+
/// request will be rejected.
277+
///
273278
/// Successive calls to this method will override the previous setting.
274279
///
275280
/// [`quantity`]: Self::quantity

0 commit comments

Comments
 (0)