Skip to content

Commit 6effba0

Browse files
fix: income by pct txns value
1 parent 63a474d commit 6effba0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/features/SlotDetails/DetailedSlotStats/FeeSection/IncomeByPctTxns.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ function percentileSpread(values: number[], percentiles: number[] = [1, 10]) {
1818
prefix[i + 1] = prefix[i] + values[i];
1919
}
2020

21-
const total = prefix[n];
22-
2321
// Normalize, de-dup, and sort requested percentiles
2422
const ps = Array.from(new Set(percentiles.map((p) => clamp(p, 0, 100)))).sort(
2523
(a, b) => a - b,
@@ -40,11 +38,10 @@ function percentileSpread(values: number[], percentiles: number[] = [1, 10]) {
4038
const k0 = countForPercentile(p0);
4139
const k1 = countForPercentile(p1);
4240
const bandSum = prefix[k1] - prefix[k0];
43-
const share = total === 0 ? 0 : bandSum / total;
4441

4542
const key = i === bounds.length - 1 ? "other" : `top${p0}-${p1}%`;
4643

47-
disjoint[key] = share;
44+
disjoint[key] = bandSum;
4845
}
4946

5047
return disjoint;

0 commit comments

Comments
 (0)