( memory: PatchyOfferMemory, kind: PatchyOfferKind, )
| 115 | }; |
| 116 | |
| 117 | export const canPatchyOffer = ( |
| 118 | memory: PatchyOfferMemory, |
| 119 | kind: PatchyOfferKind, |
| 120 | ): boolean => |
| 121 | memory.shownToday < PATCHY_OFFERS_PER_DAY && |
| 122 | !memory.never.includes(kind) && |
| 123 | !memory.offeredToday.includes(kind) && |
| 124 | (memory.dismissed[kind] ?? 0) < PATCHY_DISMISSALS_TO_MUTE; |
| 125 | |
| 126 | export const withPatchyOfferShown = ( |
| 127 | memory: PatchyOfferMemory, |
no outgoing calls
no test coverage detected