Files
tom goriunovandGitHub 25a4c2a97e Replace OP Superchain feature with generic Multichain explorer (#3299)
* rename feature

* rename evn preset

* types, mocks and stubs renaming

* rename UI components
2026-02-25 18:02:52 +01:00

13 lines
328 B
TypeScript

import { hairsp } from 'toolkit/utils/htmlEntities';
export function formatPercentage(percentage: number) {
const value = Math.round(percentage * 100);
if (value === 0 && percentage > 0) {
return `<${ hairsp }1%`;
}
if (value === 100 && percentage < 1) {
return `>${ hairsp }99%`;
}
return `${ value }%`;
}