diff --git a/packages/api-derive/src/balances/index.ts b/packages/api-derive/src/balances/index.ts index fb6684fa78..668066b14e 100644 --- a/packages/api-derive/src/balances/index.ts +++ b/packages/api-derive/src/balances/index.ts @@ -2,8 +2,15 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -export * from './all'; +import { all } from './all'; + export * from './fees'; -export * from './votingBalance'; export * from './votingBalances'; export * from './votingBalancesNominatorsFor'; + +const votingBalance = all; + +export { + all, + votingBalance +}; diff --git a/packages/api-derive/src/balances/votingBalance.ts b/packages/api-derive/src/balances/votingBalance.ts deleted file mode 100644 index c1c4995fd1..0000000000 --- a/packages/api-derive/src/balances/votingBalance.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2017-2019 @polkadot/api-derive authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { ApiInterface$Rx } from '@plugnet/api/types'; - -import { all } from './all'; - -export function votingBalance (api: ApiInterface$Rx) { - return all(api); -} diff --git a/packages/api-derive/src/balances/votingBalances.ts b/packages/api-derive/src/balances/votingBalances.ts index 5687204465..84111de3eb 100644 --- a/packages/api-derive/src/balances/votingBalances.ts +++ b/packages/api-derive/src/balances/votingBalances.ts @@ -9,14 +9,14 @@ import { AccountId, AccountIndex, Address, VectorAny } from '@plugnet/types'; import { DerivedBalances } from '../types'; import { drr } from '../util/drr'; -import { votingBalance } from './votingBalance'; +import { all } from './all'; export function votingBalances (api: ApiInterface$Rx) { return (addresses?: Array): Observable> => { return ( !addresses || !addresses.length ? of([] as Array) - : combineLatest(addresses.map(votingBalance(api))) + : combineLatest(addresses.map(all(api))) ).pipe( map((balances) => new VectorAny(...balances)