Procházet zdrojové kódy

Remove the `candidacyWithdrawn` field

Theophile Sandoz před 3 roky
rodič
revize
2f7ba37443

+ 0 - 2
query-node/mappings/src/council.ts

@@ -395,7 +395,6 @@ export async function council_NewCandidate({ event, store }: EventContext & Stor
     electionRound,
     stake: balance,
     stakeLocked: true,
-    candidacyWithdrawn: false,
     votePower: new BN(0),
     noteMetadata,
     votesRecieved: [],
@@ -568,7 +567,6 @@ export async function council_CandidacyWithdraw({ event, store }: EventContext &
   // specific event processing
 
   // mark candidacy as withdrawn
-  candidate.candidacyWithdrawn = true
   candidate.status = new CandidacyStatusWithdrawn()
   await store.save<Candidate>(candidate)
 }

+ 1 - 4
query-node/schemas/council.graphql

@@ -74,7 +74,7 @@ type CandidacyStatusLost @variant {
   dummy: Int
 }
 
-union CandidacyStatus = CandidacyStatusActive | CandidacyStatusElected | CandidacyStatusLost
+union CandidacyStatus = CandidacyStatusActive | CandidacyStatusWithdrawn | CandidacyStatusElected | CandidacyStatusLost
 
 type Candidate @entity {
   "Account used for staking currency needed for the candidacy."
@@ -98,9 +98,6 @@ type Candidate @entity {
   "Current candidate status"
   status: CandidacyStatus!
 
-  "Reflects if the candidacy was withdrawn before voting started."
-  candidacyWithdrawn: Boolean!
-
   "Sum of power of all votes received."
   votePower: BigInt!