Only memomize via instanceId (#2572)
* Add memoizee instanceId * Gotcha. * linitng
This commit is contained in:
@@ -15,8 +15,8 @@ interface Result {
|
||||
events: EventRecord[];
|
||||
}
|
||||
|
||||
export function events (api: ApiInterfaceRx): (at: Hash) => Observable<Result> {
|
||||
return memo((at: Hash): Observable<Result> =>
|
||||
export function events (instanceId: string, api: ApiInterfaceRx): (at: Hash) => Observable<Result> {
|
||||
return memo(instanceId, (at: Hash): Observable<Result> =>
|
||||
combineLatest([
|
||||
api.query.system.events.at(at),
|
||||
api.rpc.chain.getBlock(at)
|
||||
|
||||
@@ -40,7 +40,7 @@ function signingHeader (api: ApiInterfaceRx): Observable<Header> {
|
||||
);
|
||||
}
|
||||
|
||||
export function signingInfo (api: ApiInterfaceRx): (address: string, nonce?: AnyNumber | Codec, era?: IExtrinsicEra | number) => Observable<Result> {
|
||||
export function signingInfo (_instanceId: string, api: ApiInterfaceRx): (address: string, nonce?: AnyNumber | Codec, era?: IExtrinsicEra | number) => Observable<Result> {
|
||||
// no memo, we want to do this fresh on each run
|
||||
return (address: string, nonce?: AnyNumber | Codec, era?: IExtrinsicEra | number): Observable<Result> =>
|
||||
combineLatest([
|
||||
|
||||
Reference in New Issue
Block a user