-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add is_expired_no_std
to Offer
#2689
Add is_expired_no_std
to Offer
#2689
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2689 +/- ##
==========================================
- Coverage 88.78% 88.73% -0.05%
==========================================
Files 112 112
Lines 88474 88486 +12
Branches 88474 88486 +12
==========================================
- Hits 78553 78521 -32
- Misses 7686 7726 +40
- Partials 2235 2239 +4
☔ View full report in Codecov by Sentry. |
@@ -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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this to Refund
? Also, would you mind updating builds_offer_with_absolute_expiry
and builds_refund_with_absolute_expiry
to call is_expired_no_std
as well?
9b57128
to
641d7a8
Compare
This was available for OfferContents but not an Offer so dependent projects could not access it.
641d7a8
to
5ddd8a7
Compare
This was available for OfferContents but not an Offer so dependent projects could not access it.