export function truncateDecimals(value: string | number, maxDecimals = 8): string {
  const s = typeof value === 'number' ? value.toString() : value
  const dot = s.indexOf('.')
  if (dot === -1) return s
  return s.slice(0, dot + 1 + maxDecimals)
}
