()
| 73 | } |
| 74 | |
| 75 | function emitChange() { |
| 76 | const snapshot = { |
| 77 | ...state, |
| 78 | expiryDate: getExpiryDate(), |
| 79 | }; |
| 80 | listeners.forEach((listener) => { |
| 81 | try { |
| 82 | listener(snapshot); |
| 83 | } catch (error) { |
| 84 | console.error("Reward state listener failed.", error); |
| 85 | } |
| 86 | }); |
| 87 | } |
| 88 | |
| 89 | function hideActiveBanner() { |
| 90 | if (bannerAd?.active) { |
no test coverage detected