abbr wallet at 10k

This commit is contained in:
keyan 2021-11-28 11:37:18 -06:00
parent c7ae5dc8ac
commit 46162f4162
1 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@ import { useEffect, useState } from 'react'
import { randInRange } from '../lib/rand'
const formatSats = n => {
if (n < 1e3) return n
if (n >= 1e3 && n < 1e6) return +(n / 1e3).toFixed(1) + 'k'
if (n < 1e4) return n
if (n >= 1e4 && n < 1e6) return +(n / 1e3).toFixed(1) + 'k'
if (n >= 1e6 && n < 1e9) return +(n / 1e6).toFixed(1) + 'm'
if (n >= 1e9 && n < 1e12) return +(n / 1e9).toFixed(1) + 'b'
if (n >= 1e12) return +(n / 1e12).toFixed(1) + 't'