MCPcopy Create free account
hub / github.com/dailydotdev/apps / logRefresh

Function logRefresh

packages/shared/src/hooks/feed/useFeedAdRefresh.ts:71–86  ·  view source on GitHub ↗
(outcome: AdRefreshOutcome, nextAd?: Ad)

Source from the content-addressed store, hash-verified

69 stats,
70 }: AdRefreshAttempt): Promise<AdRefreshOutcome> => {
71 const logRefresh = (outcome: AdRefreshOutcome, nextAd?: Ad) =>
72 logEvent(
73 adLogEvent(AdActions.Refresh, ad, {
74 extra: getAdRefreshLogExtra({
75 slot,
76 platform: getAdRefreshPlatform(isAndroidApp),
77 providerId: ad.providerId,
78 count,
79 sessionCount,
80 policy,
81 stats,
82 outcome,
83 nextGenerationId: nextAd?.generationId,
84 }),
85 }),
86 );
87
88 let newAd: Ad | null;
89 try {

Callers 1

useFeedAdRefreshFunction · 0.85

Calls 4

adLogEventFunction · 0.90
getAdRefreshLogExtraFunction · 0.90
getAdRefreshPlatformFunction · 0.90
logEventFunction · 0.85

Tested by

no test coverage detected