Skip to content

Commit 3df13e7

Browse files
committed
fix: properly calculate IPNI stats percentages
1 parent 34ff4b2 commit 3df13e7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/app/storage-providers/components/storage-providers-ipni-misreporting-widget.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,7 @@ export function StorageProvidersIPNIMisreportingWidget({
167167
return {
168168
value: formatValue(currentValue),
169169
label: reportingStateLabelDict[reportingState],
170-
percentageChange:
171-
(bigintToPercentage(BigInt(currentValue), BigInt(previousValue), 2) -
172-
100) /
173-
100,
170+
percentageChange: currentValue / previousValue - 1,
174171
};
175172
});
176173
}, [chartData, formatValue]);

0 commit comments

Comments
 (0)