14.05.2026 rip
This commit is contained in:
@@ -17,11 +17,13 @@ const CHAIN_MAP: Record<string, ChainSource> = {
|
||||
BSC: { chain: 'BSC', type: 'native' },
|
||||
}
|
||||
|
||||
function formatUsd(value: number): string {
|
||||
function formatUsd(value: number | null | undefined): string {
|
||||
if (value == null) return '$—'
|
||||
return `$${value.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
|
||||
}
|
||||
|
||||
function formatPrice(value: number): string {
|
||||
function formatPrice(value: number | null | undefined): string {
|
||||
if (value == null) return '$—'
|
||||
if (value >= 1) {
|
||||
return `$${value.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
|
||||
}
|
||||
@@ -54,7 +56,7 @@ export function useTokenRows() {
|
||||
: chainData.tokens[src.type === 'token' ? src.symbol : t.ticker]
|
||||
|
||||
if (amount) {
|
||||
bal = amount.formatted
|
||||
bal = amount.formatted ?? t.bal
|
||||
usd = formatUsd(amount.usdValue)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user