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 = {
...
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.