Cache getTypeClass (#1183)
* Put memoizee only in types * Add some tests * Add failing tests * Make instanceof work * Better tests
This commit is contained in:
@@ -7,7 +7,7 @@ import { RpcSection, RpcMethod } from '@polkadot/jsonrpc/types';
|
||||
import { AnyJson, Codec } from '@polkadot/types/types';
|
||||
import { RpcInterface, RpcInterfaceMethod, RpcInterfaceSection } from './types';
|
||||
|
||||
import memoize from 'memoizee';
|
||||
import memoizee from 'memoizee';
|
||||
import { combineLatest, from, Observable, Observer, of, throwError } from 'rxjs';
|
||||
import { catchError, map, publishReplay, refCount, switchMap } from 'rxjs/operators';
|
||||
import interfaces from '@polkadot/jsonrpc';
|
||||
@@ -239,7 +239,7 @@ export default class Rpc implements RpcInterface {
|
||||
);
|
||||
};
|
||||
|
||||
const memoized = memoize(call, {
|
||||
const memoized = memoizee(call, {
|
||||
// Dynamic length for argument
|
||||
length: false,
|
||||
// Normalize args so that different args that should be cached
|
||||
|
||||
Reference in New Issue
Block a user