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

Function scheduleExpiryCheck

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

Source from the content-addressed store, hash-verified

157}
158
159function scheduleExpiryCheck() {
160 clearExpiryTimer();
161 if (!state.adFreeUntil) return;
162
163 const remainingMs = state.adFreeUntil - Date.now();
164 if (remainingMs <= 0) {
165 void refreshState({ notifyExpiry: true });
166 return;
167 }
168
169 expiryTimer = setTimeout(
170 () => {
171 void refreshState({ notifyExpiry: true });
172 },
173 Math.min(remainingMs, MAX_TIMEOUT),
174 );
175}
176
177async function getRewardIdentity() {
178 try {

Callers 2

refreshStateFunction · 0.85
watchOfferFunction · 0.85

Calls 2

clearExpiryTimerFunction · 0.85
refreshStateFunction · 0.85

Tested by

no test coverage detected