Remove derive memos (#1538)
* Remove derive memos * Remove outer memo * Over-eager replace
This commit is contained in:
@@ -8,16 +8,15 @@ import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
|
||||
import { drr, memo } from '../util';
|
||||
import { drr } from '../util';
|
||||
import { info } from './info';
|
||||
|
||||
export const eraProgress = memo((api: ApiInterfaceRx): () => Observable<BlockNumber> => {
|
||||
export function eraProgress (api: ApiInterfaceRx): () => Observable<BlockNumber> {
|
||||
const infoCall = info(api);
|
||||
|
||||
return memo((): Observable<BlockNumber> =>
|
||||
return (): Observable<BlockNumber> =>
|
||||
infoCall().pipe(
|
||||
map(({ eraProgress }): BlockNumber => eraProgress),
|
||||
drr()
|
||||
)
|
||||
);
|
||||
}, true);
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user