Convert RPC classes to primitive classes or /srml types (#1192)

* Convert RPC classes to primitive classes or /srml types

* Lint passes... lokking at tests next.

* Tests pass.

* Types with basic docs (lots of work here)

* Update StorageKey.spec.ts

* Add injector to metadata doc generation

* Fix import
This commit is contained in:
Jaco Greeff
2019-07-26 10:23:37 +02:00
committed by GitHub
parent 83515fc0a2
commit 478f54c703
144 changed files with 1824 additions and 2224 deletions
@@ -5,7 +5,7 @@
import { Observable, of } from 'rxjs';
import { switchMap } from 'rxjs/operators';
import { ApiInterfaceRx } from '@polkadot/api/types';
import { AccountId, AccountIndex, Address, Vector } from '@polkadot/types';
import { AccountId, AccountIndex, Address, Vec } from '@polkadot/types';
import { idAndIndex } from '../accounts/idAndIndex';
import { DerivedBalances } from '../types';
@@ -17,7 +17,7 @@ export function votingBalancesNominatorsFor (api: ApiInterfaceRx): (address: Acc
return idAndIndex(api)(address).pipe(
switchMap(([accountId]): Observable<AccountId[]> =>
accountId
? (api.query.staking.nominatorsFor<Vector<AccountId>>(accountId))
? (api.query.staking.nominatorsFor<Vec<AccountId>>(accountId))
: of([] as AccountId[])
),
switchMap(votingBalances(api)),