Remove derive memos (#1538)

* Remove derive memos

* Remove outer memo

* Over-eager replace
This commit is contained in:
Jaco Greeff
2019-11-03 11:38:36 +01:00
committed by GitHub
parent 0e037de1b1
commit 506b042f8c
44 changed files with 273 additions and 305 deletions
+5 -6
View File
@@ -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);
);
}