From 0411c4aceeb1ff642a2d342f64bd88b03f1cb31b Mon Sep 17 00:00:00 2001 From: Marc-Aurele Besner Date: Wed, 13 Nov 2024 12:08:17 -0500 Subject: [PATCH] change to use PB rather than PiB --- explorer/src/utils/number.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explorer/src/utils/number.ts b/explorer/src/utils/number.ts index aa094aef..c81168de 100644 --- a/explorer/src/utils/number.ts +++ b/explorer/src/utils/number.ts @@ -78,9 +78,9 @@ export const limitStringDecimals = (number: string, precision = 4): string => { export const formatSpacePledged = (value: number, decimals = 2) => { if (value === 0) return '0 Bytes' - const k = 1024 + const k = 1000 const dm = decimals < 0 ? 0 : decimals - const sizes = ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'] + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] const i = Math.floor(Math.log(value) / Math.log(k))