polkadot-js/apps

View on GitHub
packages/react-components/src/InputExtrinsic/options/method.tsx

Summary

Maintainability
A
1 hr
Test Coverage

Function createOptions has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function createOptions (api: ApiPromise, sectionName: string, filter?: (section: string, method?: string) => boolean): DropdownOptions {
  const section = api.tx[sectionName];
  const isAllowed = !filter || filter(sectionName);

  if (!section || Object.keys(section).length === 0 || !isAllowed) {
Severity: Minor
Found in packages/react-components/src/InputExtrinsic/options/method.tsx - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status