Adjust lazyVariants with internal $type (#5081)

* Adjust lazyVariants with internal $type

* Adjust

* Allow for empty paths

* Allow any $ override

* Adjust

* Small usage fixes, dedupe
This commit is contained in:
Jaco
2022-07-18 09:12:14 +03:00
committed by GitHub
parent 12750bc83d
commit 14f2a9da39
16 changed files with 46 additions and 33 deletions
@@ -12,7 +12,7 @@ import { isFunction } from '@polkadot/util';
import { memo } from '../util';
export function getInstance (api: DeriveApi, section: string): DeriveApi['query']['council'] {
const instances = api.registry.getModuleInstances(api.runtimeVersion.specName.toString(), section);
const instances = api.registry.getModuleInstances(api.runtimeVersion.specName, section);
const name = instances && instances.length
? instances[0]
: section;