Browse Source

Fix some typos

Theophile Sandoz 3 years ago
parent
commit
65db686f89

+ 7 - 7
query-node/mappings/src/council.ts

@@ -171,7 +171,7 @@ async function getAccountCastVote(
 
 
   if (!castVote) {
   if (!castVote) {
     throw new Error(
     throw new Error(
-      `No vote cast by the given account in the curent election round. accountId '${account}', cycleId '${electionRound?.cycleId}'`
+      `No vote cast by the given account in the current election round. accountId '${account}', cycleId '${electionRound?.cycleId}'`
     )
     )
   }
   }
 
 
@@ -315,7 +315,7 @@ export async function council_AnnouncingPeriodStarted({ event, store }: EventCon
 }
 }
 
 
 /*
 /*
-  The event is emitted when a candidacy announcment period has ended, but not enough members announced.
+  The event is emitted when a candidacy announcement period has ended, but not enough members announced.
 */
 */
 export async function council_NotEnoughCandidates({ event, store }: EventContext & StoreContext): Promise<void> {
 export async function council_NotEnoughCandidates({ event, store }: EventContext & StoreContext): Promise<void> {
   // common event processing
   // common event processing
@@ -381,7 +381,7 @@ export async function council_NewCandidate({ event, store }: EventContext & Stor
 
 
   const electionRound = await getCurrentElectionRound(store)
   const electionRound = await getCurrentElectionRound(store)
 
 
-  // prepare note metadata record (empty until explicitily set via different extrinsic)
+  // prepare note metadata record (empty until explicitly set via different extrinsic)
   const noteMetadata = new CandidacyNoteMetadata({
   const noteMetadata = new CandidacyNoteMetadata({
     bulletPoints: [],
     bulletPoints: [],
   })
   })
@@ -398,7 +398,7 @@ export async function council_NewCandidate({ event, store }: EventContext & Stor
     stakeLocked: true,
     stakeLocked: true,
     votePower: new BN(0),
     votePower: new BN(0),
     noteMetadata,
     noteMetadata,
-    votesRecieved: [],
+    votesReceived: [],
   })
   })
   await store.save<Candidate>(candidate)
   await store.save<Candidate>(candidate)
 
 
@@ -426,7 +426,7 @@ export async function council_NewCouncilElected({ event, store }: EventContext &
 
 
   // specific event processing
   // specific event processing
 
 
-  // mark old council as resinged
+  // mark old council as resigned
   const oldElectedCouncil = await getCurrentElectedCouncil(store)
   const oldElectedCouncil = await getCurrentElectedCouncil(store)
   oldElectedCouncil.isResigned = true
   oldElectedCouncil.isResigned = true
   oldElectedCouncil.endedAtBlock = event.blockNumber
   oldElectedCouncil.endedAtBlock = event.blockNumber
@@ -589,7 +589,7 @@ export async function council_CandidacyNoteSet({ event, store }: EventContext &
 
 
   const [memberId, note] = new Council.CandidacyNoteSetEvent(event).params
   const [memberId, note] = new Council.CandidacyNoteSetEvent(event).params
 
 
-  // load candidate recored
+  // load candidate recorded
   const electionRound = await getCurrentElectionRound(store)
   const electionRound = await getCurrentElectionRound(store)
   const candidate = await getCandidate(store, memberId.toString(), electionRound, ['noteMetadata'])
   const candidate = await getCandidate(store, memberId.toString(), electionRound, ['noteMetadata'])
 
 
@@ -756,7 +756,7 @@ export async function council_CouncilorRewardUpdated({ event, store }: EventCont
 }
 }
 
 
 /*
 /*
-  The event is emitted when funds are transfered from the council budget to an account.
+  The event is emitted when funds are transferred from the council budget to an account.
 */
 */
 export async function council_RequestFunded({ event, store }: EventContext & StoreContext): Promise<void> {
 export async function council_RequestFunded({ event, store }: EventContext & StoreContext): Promise<void> {
   // common event processing
   // common event processing

+ 3 - 3
query-node/schemas/council.graphql

@@ -87,8 +87,8 @@ type Candidate @entity {
   "The metadata contained in note."
   "The metadata contained in note."
   noteMetadata: CandidacyNoteMetadata!
   noteMetadata: CandidacyNoteMetadata!
 
 
-  "Votes recieved in referendums by this member."
-  votesRecieved: [CastVote!]! @derivedFrom(field: "voteFor")
+  "Votes received in referendums by this member."
+  votesReceived: [CastVote!]! @derivedFrom(field: "voteFor")
 }
 }
 
 
 type CouncilMember @entity {
 type CouncilMember @entity {
@@ -107,7 +107,7 @@ type CouncilMember @entity {
   "Stake used for the council membership."
   "Stake used for the council membership."
   stake: BigInt!
   stake: BigInt!
 
 
-  "Block number in which council member recieved the last reward payment."
+  "Block number in which council member received the last reward payment."
   lastPaymentBlock: BigInt!
   lastPaymentBlock: BigInt!
 
 
   "Reward amount that should have been paid but couldn't be paid off due to insufficient budget."
   "Reward amount that should have been paid but couldn't be paid off due to insufficient budget."

+ 4 - 4
tests/integration-tests/src/graphql/generated/schema.ts

@@ -2049,7 +2049,7 @@ export type Candidate = BaseGraphQlObject & {
   lastVoteReceivedAtEventNumber?: Maybe<Scalars['Int']>
   lastVoteReceivedAtEventNumber?: Maybe<Scalars['Int']>
   noteMetadata: CandidacyNoteMetadata
   noteMetadata: CandidacyNoteMetadata
   noteMetadataId: Scalars['String']
   noteMetadataId: Scalars['String']
-  votesRecieved: Array<CastVote>
+  votesReceived: Array<CastVote>
   candidacynoteseteventcandidate?: Maybe<Array<CandidacyNoteSetEvent>>
   candidacynoteseteventcandidate?: Maybe<Array<CandidacyNoteSetEvent>>
   candidacystakereleaseeventcandidate?: Maybe<Array<CandidacyStakeReleaseEvent>>
   candidacystakereleaseeventcandidate?: Maybe<Array<CandidacyStakeReleaseEvent>>
   candidacywithdraweventcandidate?: Maybe<Array<CandidacyWithdrawEvent>>
   candidacywithdraweventcandidate?: Maybe<Array<CandidacyWithdrawEvent>>
@@ -2192,9 +2192,9 @@ export type CandidateWhereInput = {
   member?: Maybe<MembershipWhereInput>
   member?: Maybe<MembershipWhereInput>
   electionRound?: Maybe<ElectionRoundWhereInput>
   electionRound?: Maybe<ElectionRoundWhereInput>
   noteMetadata?: Maybe<CandidacyNoteMetadataWhereInput>
   noteMetadata?: Maybe<CandidacyNoteMetadataWhereInput>
-  votesRecieved_none?: Maybe<CastVoteWhereInput>
-  votesRecieved_some?: Maybe<CastVoteWhereInput>
-  votesRecieved_every?: Maybe<CastVoteWhereInput>
+  votesReceived_none?: Maybe<CastVoteWhereInput>
+  votesReceived_some?: Maybe<CastVoteWhereInput>
+  votesReceived_every?: Maybe<CastVoteWhereInput>
   candidacynoteseteventcandidate_none?: Maybe<CandidacyNoteSetEventWhereInput>
   candidacynoteseteventcandidate_none?: Maybe<CandidacyNoteSetEventWhereInput>
   candidacynoteseteventcandidate_some?: Maybe<CandidacyNoteSetEventWhereInput>
   candidacynoteseteventcandidate_some?: Maybe<CandidacyNoteSetEventWhereInput>
   candidacynoteseteventcandidate_every?: Maybe<CandidacyNoteSetEventWhereInput>
   candidacynoteseteventcandidate_every?: Maybe<CandidacyNoteSetEventWhereInput>