@merkl/api 0.10.275 → 0.10.276
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -137,7 +137,7 @@ export class CampaignService {
|
|
137
137
|
*/
|
138
138
|
static splitOnStatus(campaigns, timestamp = moment().unix()) {
|
139
139
|
const past = campaigns.filter(({ endTimestamp: end }) => end <= timestamp);
|
140
|
-
const live = campaigns.filter(({ startTimestamp: start, endTimestamp: end }) =>
|
140
|
+
const live = campaigns.filter(({ startTimestamp: start, endTimestamp: end }) => timestamp >= start && timestamp < end);
|
141
141
|
const soon = campaigns.filter(({ startTimestamp: start }) => start > timestamp);
|
142
142
|
return { past, live, soon };
|
143
143
|
}
|
@@ -109,7 +109,7 @@ export class OpportunityService {
|
|
109
109
|
type: campaignType,
|
110
110
|
identifier: campaign.opportunityIdentifier, // mainParameter
|
111
111
|
name: metadata.name,
|
112
|
-
status: +campaign.startTimestamp
|
112
|
+
status: now >= +campaign.startTimestamp && now < +campaign.endTimestamp
|
113
113
|
? Status.LIVE
|
114
114
|
: now > +campaign.endTimestamp
|
115
115
|
? Status.PAST
|