Remove double-up-drr (memo vs rpc) (#1541)
* Remove inner memo (no double-up on stringify) * Validators-specific query
This commit is contained in:
@@ -16,7 +16,7 @@ import { drr, memo } from '../util';
|
||||
* @description From the list of stash accounts, retrieve the list of controllers
|
||||
*/
|
||||
export const controllers = memo((api: ApiInterfaceRx): () => Observable<[AccountId[], Option<AccountId>[]]> => {
|
||||
return memo((): Observable<[AccountId[], Option<AccountId>[]]> =>
|
||||
return (): Observable<[AccountId[], Option<AccountId>[]]> =>
|
||||
api.query.staking.validators<[AccountId[]] & Codec>().pipe(
|
||||
switchMap(([stashIds]): Observable<[AccountId[], Option<AccountId>[]]> =>
|
||||
combineLatest([
|
||||
@@ -28,5 +28,5 @@ export const controllers = memo((api: ApiInterfaceRx): () => Observable<[Account
|
||||
])
|
||||
),
|
||||
drr()
|
||||
));
|
||||
);
|
||||
}, true);
|
||||
|
||||
Reference in New Issue
Block a user