diff --git a/packages/api-derive/src/allianceMotion/index.ts b/packages/api-derive/src/alliance/index.ts similarity index 100% rename from packages/api-derive/src/allianceMotion/index.ts rename to packages/api-derive/src/alliance/index.ts diff --git a/packages/api-derive/src/collective/proposals.ts b/packages/api-derive/src/collective/proposals.ts index 2e750736a9..515620b927 100644 --- a/packages/api-derive/src/collective/proposals.ts +++ b/packages/api-derive/src/collective/proposals.ts @@ -58,7 +58,7 @@ export function hasProposals (section: Collective): (instanceId: string, api: De export function proposals (section: Collective): (instanceId: string, api: DeriveApi) => () => Observable { return withSection(section, (query, api) => (): Observable => - api.derive[section].proposalHashes().pipe( + api.derive[section as 'council'].proposalHashes().pipe( switchMap((all) => _proposalsFrom(api, query, all)) ) ); diff --git a/packages/api-derive/src/derive.ts b/packages/api-derive/src/derive.ts index 9b769b2e38..7cfc04ae97 100644 --- a/packages/api-derive/src/derive.ts +++ b/packages/api-derive/src/derive.ts @@ -4,7 +4,7 @@ import type { AnyFunction } from '@polkadot/types/types'; import * as accounts from './accounts'; -import * as allianceMotion from './allianceMotion'; +import * as alliance from './alliance'; import * as bagsList from './bagsList'; import * as balances from './balances'; import * as bounties from './bounties'; @@ -24,7 +24,7 @@ import * as technicalCommittee from './technicalCommittee'; import * as treasury from './treasury'; import * as tx from './tx'; -export const derive = { accounts, allianceMotion, bagsList, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx }; +export const derive = { accounts, alliance, bagsList, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx }; type DeriveSection
= { [M in keyof Section]: Section[M] extends AnyFunction