Skip to content

Commit

Permalink
change to use PB rather than PiB
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusDesk committed Nov 13, 2024
1 parent fa015b7 commit 0411c4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions explorer/src/utils/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 0411c4a

Please sign in to comment.