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

Remove proposal status and vote option enum workarounds #124

Open
ryanchristo opened this issue Jul 27, 2023 · 0 comments
Open

Remove proposal status and vote option enum workarounds #124

ryanchristo opened this issue Jul 27, 2023 · 0 comments
Labels
dev Engineering task help wanted Extra attention is needed

Comments

@ryanchristo
Copy link
Member

ryanchristo commented Jul 27, 2023

This issue tracks the removal of the workarounds in src/util/enum.ts for proposal status and vote option. This may involve investigating the issue upstream in either regen-js and/or telescope to identify its source.

/**
 * TODO: the generated `ProposalStatus` enum returns number values, but the
 * actual API response is the keys of those values. We also can't import that
 * enum directly because of a combo of vite and the generated code - this is a
 * copy-pasted version of the enum from the SDK, converted to a normal object,
 * used to generate an equivalent a second object with the correct values
 */
const GeneratedProposalStatus: typeof ProposalStatusType = {
...
/** TODO: VoteOption won't properly import into vite as an export directly from
 * the generated lib - this is copy-pasted */
export const VoteOption: typeof VoteOptionType = {
...
@ryanchristo ryanchristo added dev Engineering task help wanted Extra attention is needed labels Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Engineering task help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant