Function: offerStatus()
function offerStatus(
offer,
closure?,
now?): OfferStatus;
Defined in: packages/overcast-core/src/curation/lifecycle.ts:26
Derive an offer's OfferStatus from the events that closed it and its
own deadline. now is unix seconds — the same unit as Offer.expiry —
and defaults to the local clock.
A terminal event wins over the clock: an offer matched or cancelled before its
deadline keeps reading that way forever, rather than turning into expired
once the deadline passes. The deadline second itself still counts as open
(now > expiry expires it) — the same inclusive boundary optionState
uses for an option's window.
Parameters
| Parameter | Type |
|---|---|
offer | Offer |
closure | OfferClosure |
now | number |