Fix derive.democracy.preimage signature (#2194)
This commit is contained in:
@@ -17,8 +17,8 @@ import { parseImage } from './util';
|
||||
type PreImage = Option<ITuple<[Bytes, AccountId, Balance, BlockNumber]>>;
|
||||
|
||||
export function preimage (api: ApiInterfaceRx): (hash: Hash) => Observable<DeriveProposalImage | undefined> {
|
||||
return memo((hashes: Hash[]): Observable<DeriveProposalImage | undefined> =>
|
||||
api.query.democracy.preimages<PreImage>(hashes).pipe(
|
||||
return memo((hash: Hash): Observable<DeriveProposalImage | undefined> =>
|
||||
api.query.democracy.preimages<PreImage>(hash).pipe(
|
||||
map((imageOpt) => parseImage(api, imageOpt))
|
||||
)
|
||||
);
|
||||
|
||||
@@ -20,9 +20,7 @@ export function preimages (api: ApiInterfaceRx): (hashes: Hash[]) => Observable<
|
||||
return memo((hashes: Hash[]): Observable<(DeriveProposalImage | undefined)[]> =>
|
||||
api.query.democracy.preimages.multi<PreImage>(hashes).pipe(
|
||||
map((images): (DeriveProposalImage | undefined)[] =>
|
||||
images.map((imageOpt) =>
|
||||
parseImage(api, imageOpt)
|
||||
)
|
||||
images.map((imageOpt) => parseImage(api, imageOpt))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user