Remove derive memos (#1538)
* Remove derive memos * Remove outer memo * Over-eager replace
This commit is contained in:
@@ -10,10 +10,10 @@ import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { u32 } from '@polkadot/types';
|
||||
|
||||
import { drr, memo } from '../util';
|
||||
import { drr } from '../util';
|
||||
|
||||
export const indexes = memo((api: ApiInterfaceRx): () => Observable<DeriveSessionIndexes> => {
|
||||
return memo((): Observable<DeriveSessionIndexes> =>
|
||||
export function indexes (api: ApiInterfaceRx): () => Observable<DeriveSessionIndexes> {
|
||||
return (): Observable<DeriveSessionIndexes> =>
|
||||
api.queryMulti<[SessionIndex, EraIndex, u32]>([
|
||||
api.query.session.currentIndex,
|
||||
api.query.staking.currentEra,
|
||||
@@ -23,6 +23,5 @@ export const indexes = memo((api: ApiInterfaceRx): () => Observable<DeriveSessio
|
||||
currentIndex, currentEra, validatorCount
|
||||
})),
|
||||
drr()
|
||||
)
|
||||
);
|
||||
}, true);
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user