@@ -186,6 +186,7 @@ class RewardsUseCaseImpl(
186186 val betaEntries = mutableListOf<Entry >()
187187 val correctionEntries = mutableListOf<Entry >()
188188 val rolloutsEntries = mutableListOf<Entry >()
189+ val cellBountyEntries = mutableListOf<Entry >()
189190 val otherEntries = mutableListOf<Entry >()
190191 val totals = mutableListOf<Float >()
191192 val datesChartTooltip = mutableListOf<String >()
@@ -198,6 +199,7 @@ class RewardsUseCaseImpl(
198199 val betaCode = RewardsCode .beta_rewards.name
199200 val correctionCode = RewardsCode .correction.name
200201 val rolloutsCode = RewardsCode .trov2.name
202+ val cellBountyCode = RewardsCode .cell_bounty.name
201203 var sum = 0F
202204 var baseSum = 0F
203205 var baseFound = false
@@ -209,6 +211,8 @@ class RewardsUseCaseImpl(
209211 var correctionFound = false
210212 var rolloutsSum = 0F
211213 var rolloutsFound = false
214+ var cellBountySum = 0F
215+ var cellBountyFound = false
212216
213217 /* *
214218 * In order for the "chart with filled layers" to work properly, we need to add
@@ -224,6 +228,8 @@ class RewardsUseCaseImpl(
224228 val isBase = it.code == baseCode
225229 val isBeta = it.code == betaCode
226230 val isRollouts = it.code == rolloutsCode
231+ val isCellBounty = it.code.startsWith(cellBountyCode)
232+ val isCorrection = it.code.startsWith(correctionCode)
227233
228234 if (isBase) {
229235 baseSum + = it.value
@@ -237,13 +243,16 @@ class RewardsUseCaseImpl(
237243 rolloutsSum + = it.value
238244 rolloutsFound = true
239245 }
240- val isCorrection = it.code.startsWith(correctionCode)
241246 if (isCorrection) {
242247 correctionSum + = it.value
243248 correctionFound = true
244249 }
250+ if (isCellBounty) {
251+ cellBountySum + = it.value
252+ cellBountyFound = true
253+ }
245254 @Suppress(" ComplexCondition" )
246- if (! isBase && ! isBeta && ! isCorrection && ! isRollouts) {
255+ if (! isBase && ! isBeta && ! isCorrection && ! isRollouts && ! isCellBounty ) {
247256 othersSum + = it.value
248257 othersFound = true
249258 }
@@ -279,10 +288,18 @@ class RewardsUseCaseImpl(
279288 isFound = rolloutsFound,
280289 sum = rolloutsSum
281290 )
291+ cellBountyEntries.createNewEntry(
292+ x = counter,
293+ yIfNotFound = - 1F ,
294+ yIfFound = cellBountySum + rolloutsSum + betaSum + baseSum + correctionSum,
295+ isFound = cellBountyFound,
296+ sum = cellBountySum
297+ )
282298 otherEntries.createNewEntry(
283299 x = counter,
284300 yIfNotFound = Float .NaN ,
285- yIfFound = othersSum + correctionSum + betaSum + baseSum + rolloutsSum,
301+ yIfFound = othersSum + cellBountySum + correctionSum + betaSum + baseSum +
302+ rolloutsSum,
286303 isFound = othersFound,
287304 sum = othersSum
288305 )
@@ -298,6 +315,7 @@ class RewardsUseCaseImpl(
298315 LineChartData (xLabels, betaEntries),
299316 LineChartData (xLabels, correctionEntries),
300317 LineChartData (xLabels, rolloutsEntries),
318+ LineChartData (xLabels, cellBountyEntries),
301319 LineChartData (xLabels, otherEntries),
302320 Status .SUCCESS
303321 )
0 commit comments