Only memomize via instanceId (#2572)

* Add memoizee instanceId

* Gotcha.

* linitng
This commit is contained in:
Jaco Greeff
2020-09-02 17:13:38 +02:00
committed by GitHub
parent e13514cd94
commit b6d1be6ee5
83 changed files with 244 additions and 246 deletions
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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([