fix: bigint undefine

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-07-02 12:14:39 +08:00
parent ecce22d0a7
commit 77328ef8db
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ export const Balance = ({
withSuffix?: boolean
withTooltip?: boolean
}) => {
const n = [BigInt(children), 18] as const
const n = [BigInt(children || 0n), 18] as const
const formatted = format(n, { digits: precision, trailingZeros: true })
const formattedFull = format(n, { digits: 18, trailingZeros: true })