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
+1 -1
View File
@@ -150,7 +150,7 @@ function querySystemAccount (api: DeriveApi, accountId: AccountId): Observable<R
* ```
*/
export function account (instanceId: string, api: DeriveApi): (address: AccountIndex | AccountId | Address | string) => Observable<DeriveBalancesAccount> {
const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName.toString(), 'balances');
const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName, 'balances');
return memo(instanceId, (address: AccountIndex | AccountId | Address | string): Observable<DeriveBalancesAccount> =>
api.derive.accounts.accountId(address).pipe(
+1 -1
View File
@@ -211,7 +211,7 @@ function queryCurrent (api: DeriveApi, accountId: AccountId | string, balanceIns
* ```
*/
export function all (instanceId: string, api: DeriveApi): (address: AccountId | string) => Observable<DeriveBalancesAll> {
const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName.toString(), 'balances');
const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName, 'balances');
return memo(instanceId, (address: AccountId | string): Observable<DeriveBalancesAll> =>
combineLatest([