Skip to content

Commit

Permalink
Add is_expired_no_std to Offer
Browse files Browse the repository at this point in the history
This was available for OfferContents but not an Offer so dependent
projects could not access it.
  • Loading branch information
benthecarman committed Oct 26, 2023
1 parent d2242f6 commit 9b57128
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lightning/src/offers/offer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ impl Offer {
self.contents.is_expired()
}

/// Whether the offer has expired given the duration since the Unix epoch.
pub fn is_expired_no_std(&self, duration_since_epoch: Duration) -> bool {
self.contents.is_expired_no_std(duration_since_epoch)
}

/// Returns whether the given quantity is valid for the offer.
pub fn is_valid_quantity(&self, quantity: u64) -> bool {
self.contents.is_valid_quantity(quantity)
Expand Down

0 comments on commit 9b57128

Please sign in to comment.