MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getDefaultState

Function getDefaultState

src/lib/adRewards.js:37–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35const listeners = new Set();
36
37function getDefaultState() {
38 return {
39 adFreeUntil: 0,
40 lastExpiredRewardUntil: 0,
41 isActive: false,
42 remainingMs: 0,
43 redemptionsToday: 0,
44 remainingRedemptions: 3,
45 maxRedemptionsPerDay: 3,
46 maxActivePassMs: 10 * ONE_HOUR,
47 hasPendingExpiryNotice: false,
48 expiryNoticePendingUntil: 0,
49 canRedeem: true,
50 redeemDisabledReason: "",
51 };
52}
53
54function formatDuration(durationMs) {
55 const totalHours = Math.round(durationMs / ONE_HOUR);

Callers 2

adRewards.jsFile · 0.85
normalizeStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected