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

Investigate failing parsing YAML on local dev environment #176

Closed
nicolasbrugneaux opened this issue Sep 19, 2023 · 0 comments · Fixed by #178
Closed

Investigate failing parsing YAML on local dev environment #176

nicolasbrugneaux opened this issue Sep 19, 2023 · 0 comments · Fixed by #178
Assignees

Comments

@nicolasbrugneaux
Copy link
Contributor

nicolasbrugneaux commented Sep 19, 2023

Context:
Running locally via yarn dev, with a wallet connected to mainnet.

The Govern tab doesn't load, and displays an error instead:
image

Specifically, CGP 99 triggers the problem.
This proposal has no value (or placeholder) for date-executed. When this proposal is omitted from the list, the page loads without error.

In the function parsedYAMLFromMarkdown defined in src/utils/proposals.ts, it assumes 2-element arrays resulting from splitting a string on a :. For CGP 99, this array only contains a single element, and doesn't fail gracefully in a dev environment.

It seems to work in production.

@yerdua yerdua changed the title Investigate failing parsing YAML on local dev environement Investigate failing parsing YAML on local dev environment Sep 19, 2023
nicolasbrugneaux added a commit that referenced this issue Sep 19, 2023
…lues

Also replace the handcrafted yaml parser
[Closes #176]
nicolasbrugneaux added a commit that referenced this issue Sep 20, 2023
…lues (#178)

* fix: prevent app from crashing in dev mode when yaml has undefined values

Also replace the handcrafted yaml parser
[Closes #176]

* Update src/features/governance/data/getProposals.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants