From 81499d410802aa9f35cd962075c3b4b1e61cb980 Mon Sep 17 00:00:00 2001 From: Rico Date: Tue, 28 Jun 2022 18:51:54 +0800 Subject: [PATCH] react-app: Define custom vote options enum for gql refs #128 --- react-app/codegen.yml | 1 + react-app/src/models/cosmos/gov.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/react-app/codegen.yml b/react-app/codegen.yml index a31eb4e21..ba80b61ac 100644 --- a/react-app/codegen.yml +++ b/react-app/codegen.yml @@ -6,6 +6,7 @@ generates: config: enumValues: ProposalStatus: ../models/cosmos/gov#ProposalStatus + ProposalVoteOption: ../models/cosmos/gov#VoteOption plugins: - "typescript" - "typescript-operations" diff --git a/react-app/src/models/cosmos/gov.ts b/react-app/src/models/cosmos/gov.ts index b60189912..15798e0d2 100644 --- a/react-app/src/models/cosmos/gov.ts +++ b/react-app/src/models/cosmos/gov.ts @@ -23,6 +23,13 @@ export enum ProposalStatus { Invalid = "PROPOSAL_STATUS_INVALID", } +export enum VoteOption { + Abstain = "VOTE_OPTION_ABSTAIN", + No = "VOTE_OPTION_NO", + NoWithVeto = "VOTE_OPTION_NO_WITH_VETO", + Yes = "VOTE_OPTION_YES", +} + export enum ProposalType { Signaling = "Signaling", ParameterChange = "ParameterChange",