Skip to content

Commit

Permalink
Update docs for amount_msats to handle currency cases
Browse files Browse the repository at this point in the history
Improves documentation for the amount_msats method in 
InvoiceRequestBuilder. The update describes the
behavior when an Offer specifies a currency.
  • Loading branch information
slanesuke committed Aug 22, 2024
1 parent 2096c75 commit 454615d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lightning/src/offers/invoice_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ macro_rules! invoice_request_builder_methods { (
/// Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
/// not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
///
/// When the [`Offer`] specifies a currency, this method allows setting the `amount_msats` in the
/// `InvoiceRequest`. The issuer of the Offer will validate this amount and must set a matching
/// amount in the final invoice. If the issuer disagrees with the specfified amount, the invoice
/// request will be rejected. This is also useful if the Offer doesn't specify an amount.
///
/// Successive calls to this method will override the previous setting.
///
/// [`quantity`]: Self::quantity
Expand Down

0 comments on commit 454615d

Please sign in to comment.