kleros/kleros-v2

View on GitHub
web/src/utils/isLastRound.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { formatEther } from "viem";

import { isUndefined } from "utils/index";

export const isLastRound = (appealCost?: bigint) => {
  if (!isUndefined(appealCost) && Number(formatEther(appealCost)) > Number.MAX_SAFE_INTEGER) {
    return true;
  }
  return false;
};