Remove double-up-drr (memo vs rpc) (#1541)
* Remove inner memo (no double-up on stringify) * Validators-specific query
This commit is contained in:
@@ -28,12 +28,11 @@ export function constructInfo (index: BN | number, optionInfo?: Option<Referendu
|
||||
}
|
||||
|
||||
export const referendumInfo = memo((api: ApiInterfaceRx): (index: BN | number) => Observable<Option<ReferendumInfoExtended>> => {
|
||||
return memo((index: BN | number): Observable<Option<ReferendumInfoExtended>> =>
|
||||
(api.query.democracy.referendumInfoOf<Option<ReferendumInfo>>(index))
|
||||
.pipe(
|
||||
map((optionInfo): Option<ReferendumInfoExtended> =>
|
||||
constructInfo(index, optionInfo)
|
||||
),
|
||||
drr()
|
||||
));
|
||||
return (index: BN | number): Observable<Option<ReferendumInfoExtended>> =>
|
||||
api.query.democracy.referendumInfoOf<Option<ReferendumInfo>>(index).pipe(
|
||||
map((optionInfo): Option<ReferendumInfoExtended> =>
|
||||
constructInfo(index, optionInfo)
|
||||
),
|
||||
drr()
|
||||
);
|
||||
}, true);
|
||||
|
||||
Reference in New Issue
Block a user