Remove double-up-drr (memo vs rpc) (#1541)

* Remove inner memo (no double-up on stringify)

* Validators-specific query
This commit is contained in:
Jaco Greeff
2019-11-03 23:47:55 +01:00
committed by GitHub
parent d39878c875
commit 2371d6a29c
38 changed files with 100 additions and 93 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ import { u32 } from '@polkadot/types';
import { drr, memo } from '../util';
export const indexes = memo((api: ApiInterfaceRx): () => Observable<DeriveSessionIndexes> => {
return memo((): Observable<DeriveSessionIndexes> =>
return (): Observable<DeriveSessionIndexes> =>
api.queryMulti<[SessionIndex, EraIndex, u32]>([
api.query.session.currentIndex,
api.query.staking.currentEra,
@@ -23,5 +23,5 @@ export const indexes = memo((api: ApiInterfaceRx): () => Observable<DeriveSessio
currentIndex, currentEra, validatorCount
})),
drr()
));
);
}, true);