Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lint errors #47

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/utils/monitoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ export const getAccountIdentity = async (
identityCache[account] = {
lastUpdate: Date.now(),
identity: identity && ("info" in identity ? identity : identity[0]),
superOf: superOfIdentity && ("info" in superOfIdentity ? superOfIdentity : superOfIdentity[0]),
superOf:
superOfIdentity && ("info" in superOfIdentity ? superOfIdentity : superOfIdentity[0]),
};
}

Expand Down
7 changes: 5 additions & 2 deletions src/utils/referenda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ function parseImage(
}

async function getImageProposal(api: ApiPromise | ApiDecoration<"promise">, hash: string) {
const optStatus = "requestStatusFor" in api.query.preimage ? await api.query.preimage["requestStatusFor"](hash) : await api.query.preimage.statusFor(hash);
const optStatus =
"requestStatusFor" in api.query.preimage
? await api.query.preimage["requestStatusFor"](hash)
: await api.query.preimage.statusFor(hash);
const status = optStatus.unwrapOr(null) as PalletPreimageRequestStatus;
if (!status) {
return null;
Expand Down Expand Up @@ -338,7 +341,7 @@ export async function getReferendumByGroups(
}
const { apiAt, ongoing } = await getReferendumOnGoing(api, id, info);
// Old proposal had the hash directly
const proposalHash = getPreimageHash(ongoing.proposal || (ongoing as any).proposalHash);
const proposalHash = getPreimageHash(ongoing.proposal || (ongoing as any).proposalHash);
return {
id,
ongoing,
Expand Down