polkadot-js/apps

View on GitHub
packages/page-contracts/src/useAbi.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function useAbiImpl has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function useAbiImpl (initialValue: [string | null | undefined, Abi | null | undefined] = [null, null], codeHash: string | null = null, isRequired = false): UseAbi {
  const [state, setAbi] = useState<AbiState>(() => fromInitial(initialValue, isRequired));

  useEffect(
    () => setAbi((state) =>
Severity: Minor
Found in packages/page-contracts/src/useAbi.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status