polkadot-js/apps

View on GitHub
packages/react-hooks/src/useApiUrl.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function useApiUrlImpl has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function useApiUrlImpl (url?: null | string | string[]): ApiPromise | null {
  const providerRef = useRef<ProviderInterface | null>(null);
  const mountedRef = useIsMountedRef();
  const [state, setState] = useState<ApiPromise | null>(null);
  const urls = useMemo(
Severity: Minor
Found in packages/react-hooks/src/useApiUrl.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status