Skip to content

Commit

Permalink
fix lint errors (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
noandrea committed Apr 29, 2024
1 parent 9f889cd commit a4629c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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

0 comments on commit a4629c0

Please sign in to comment.