Support explicit quantity_max = 1 in Offer
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 18 Jan 2023 22:44:16 +0000 (16:44 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 30 Jan 2023 21:44:39 +0000 (15:44 -0600)
commit4059677e8e7421c639a4b38eeca1423efb33a3f6
tree4869ff1d89ab142fbe94965dba5491d9681b0947
parent15f12953b2b0931d8bbb03fd341679b72b8e79dd
Support explicit quantity_max = 1 in Offer

The spec was modified to allow setting offer_quantity_max explicitly to
one. This is to support a use case where more than one item is supported
but only one item is left in the inventory. Introduce a Quantity::One
variant to replace Quantity::Bounded(1) so the later can be used for the
explicit setting.
lightning/src/offers/invoice_request.rs
lightning/src/offers/offer.rs