|
@@ -28,7 +28,12 @@ import {
|
|
|
} from "@joystream/types/council";
|
|
|
import { Entity, EntityId } from "@joystream/types/content-directory";
|
|
|
import { ContentId, DataObject } from "@joystream/types/media";
|
|
|
-import { MemberId, Membership } from "@joystream/types/members";
|
|
|
+import {
|
|
|
+ MemberId,
|
|
|
+ Membership,
|
|
|
+ PaidMembershipTerms,
|
|
|
+ PaidTermId,
|
|
|
+} from "@joystream/types/members";
|
|
|
import { Mint, MintId } from "@joystream/types/mint";
|
|
|
import {
|
|
|
Proposal,
|
|
@@ -278,10 +283,8 @@ export const getWorkerReward = (
|
|
|
export const getCouncilMint = (api: ApiPromise, hash: Hash): Promise<MintId> =>
|
|
|
api.query.council.councilMint.at(hash);
|
|
|
|
|
|
-export const getGroupMint = async (
|
|
|
- api: ApiPromise,
|
|
|
- group: string
|
|
|
-): Promise<MintId> => (await api.query[group].mint()) as MintId;
|
|
|
+export const getGroupMint = (api: ApiPromise, group: string): Promise<MintId> =>
|
|
|
+ api.query[group].mint();
|
|
|
|
|
|
export const getMintsCreated = async (
|
|
|
api: ApiPromise,
|
|
@@ -507,8 +510,8 @@ export const getPaidMembershipTermsById = (
|
|
|
api: ApiPromise,
|
|
|
hash: Hash,
|
|
|
id: PaidTermId | number
|
|
|
-): Promise<PaidMembershipTerms> => api.query.members.paidMembershipTermsById.at(hash, id);
|
|
|
-
|
|
|
+): Promise<PaidMembershipTerms> =>
|
|
|
+ api.query.members.paidMembershipTermsById.at(hash, id);
|
|
|
|
|
|
// media
|
|
|
export const getNextEntity = async (
|
|
@@ -519,15 +522,11 @@ export const getNextEntity = async (
|
|
|
(await api.query.contentDirectory.nextEntityId.at(hash)) as EntityId
|
|
|
).toNumber();
|
|
|
|
|
|
-export const getNextChannel = async (
|
|
|
- api: ApiPromise,
|
|
|
- hash: Hash
|
|
|
-): Promise<number> => Number(await api.query.content.nextChannelId.at(hash));
|
|
|
+export const getNextChannel = (api: ApiPromise, hash: Hash): Promise<number> =>
|
|
|
+ api.query.content.nextChannelId.at(hash);
|
|
|
|
|
|
-export const getNextVideo = async (
|
|
|
- api: ApiPromise,
|
|
|
- hash: Hash
|
|
|
-): Promise<number> => Number(await api.query.content.nextVideoId.at(hash));
|
|
|
+export const getNextVideo = (api: ApiPromise, hash: Hash): Promise<number> =>
|
|
|
+ api.query.content.nextVideoId.at(hash);
|
|
|
|
|
|
export const getEntity = (
|
|
|
api: ApiPromise,
|