kleros/kleros-v2

View on GitHub
web/src/hooks/useParsedAmount.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { useMemo } from "react";

import { parseUnits } from "viem";

export function useParsedAmount(amount: `${number}`): bigint {
  return useMemo(() => parseUnits(amount, 18), [amount]);
}