packages/react-components/src/InputExtrinsic/options/method.tsx
Function createOptions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {