Minor cleanups, no functionality (#1308)
* Minor cleanups, no functionality * Shared fee parsing
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AccountId } from '@polkadot/types/interfaces';
|
||||
import { Codec } from '@polkadot/types/types';
|
||||
|
||||
import { Observable, combineLatest, of } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
@@ -16,7 +17,8 @@ import { drr } from '../util/drr';
|
||||
*/
|
||||
export function controllers (api: ApiInterfaceRx): () => Observable<[AccountId[], Option<AccountId>[]]> {
|
||||
return (): Observable<[AccountId[], Option<AccountId>[]]> =>
|
||||
(api.query.staking.validators() as any as Observable<[AccountId[], any]>)
|
||||
api.query.staking
|
||||
.validators<[AccountId[]] & Codec>()
|
||||
.pipe(
|
||||
switchMap(([stashIds]): Observable<[AccountId[], Option<AccountId>[]]> =>
|
||||
combineLatest([
|
||||
|
||||
Reference in New Issue
Block a user