Skip to content

Commit 9b57128

Browse files
committed
Add is_expired_no_std to Offer
This was available for OfferContents but not an Offer so dependent projects could not access it.
1 parent d2242f6 commit 9b57128

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lightning/src/offers/offer.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,11 @@ impl Offer {
468468
self.contents.is_expired()
469469
}
470470

471+
/// Whether the offer has expired given the duration since the Unix epoch.
472+
pub fn is_expired_no_std(&self, duration_since_epoch: Duration) -> bool {
473+
self.contents.is_expired_no_std(duration_since_epoch)
474+
}
475+
471476
/// Returns whether the given quantity is valid for the offer.
472477
pub fn is_valid_quantity(&self, quantity: u64) -> bool {
473478
self.contents.is_valid_quantity(quantity)

0 commit comments

Comments
 (0)