Remove some as any as Observable from derives (#1129)
This commit is contained in:
@@ -90,7 +90,7 @@ export function all (api: ApiInterfaceRx): (address: AccountIndex | AccountId |
|
||||
])
|
||||
])
|
||||
: of([undefined, undefined, [undefined, undefined, undefined, undefined, undefined]])
|
||||
) as any as Observable<Result>
|
||||
) as Observable<Result>
|
||||
),
|
||||
map(calcBalances),
|
||||
drr()
|
||||
|
||||
@@ -17,7 +17,7 @@ export function referendums (api: ApiInterfaceRx): () => Observable<Option<Refer
|
||||
(api.queryMulti([
|
||||
api.query.democracy.nextTally,
|
||||
api.query.democracy.referendumCount
|
||||
]) as any as Observable<[ReferendumIndex?, ReferendumIndex?]>).pipe(
|
||||
]) as Observable<[ReferendumIndex?, ReferendumIndex?]>).pipe(
|
||||
switchMap(([nextTally, referendumCount]): Observable<Option<ReferendumInfoExtended>[]> =>
|
||||
referendumCount && nextTally && referendumCount.gt(nextTally) && referendumCount.gtn(0)
|
||||
? referendumInfos(api)(
|
||||
|
||||
@@ -19,7 +19,7 @@ export function controllers (api: ApiInterfaceRx): () => Observable<[AccountId[]
|
||||
switchMap(([stashIds]): Observable<[AccountId[], Option<AccountId>[]]> =>
|
||||
combineLatest([
|
||||
of(stashIds),
|
||||
api.query.staking.bonded.multi(stashIds) as any as Observable<Option<AccountId>[]>
|
||||
api.query.staking.bonded.multi(stashIds) as Observable<Option<AccountId>[]>
|
||||
])
|
||||
),
|
||||
drr()
|
||||
|
||||
Reference in New Issue
Block a user