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

Enum does not exist error #191

Open
lostintime101 opened this issue Jan 26, 2024 · 2 comments
Open

Enum does not exist error #191

lostintime101 opened this issue Jan 26, 2024 · 2 comments
Labels
bug Something isn't working test

Comments

@lostintime101
Copy link
Contributor

"Enum variant does not exist." error when the Enum does exist and the menu displays them.

There is also a small issue with the capitalization of the first character
.e.g. the Enum menu first option appears as 'aDD' when it should be 'ADD'

u4mzqort.mp4

33d

Code
Program IDL
444

@acheroncrypto acheroncrypto added bug Something isn't working test labels Jan 26, 2024
@acheroncrypto
Copy link
Member

Rust convention is to use PascalCase for enum variants so the UI does PascalCase to camelCase conversion to make it work with Anchor but your variants here are UPPERCASE so the case conversion is incorrect. We can fix this from playground side to not assume PascalCase variants but in the meantime, you can also fix this by converting your enum variants to PascalCase.

@lostintime101
Copy link
Contributor Author

Nice. Can confirm Pascal case fixes this (see pic)

cfsdfd

lostintime101 added a commit to lostintime101/seahorse that referenced this issue Jan 27, 2024
Updated the Calculator example program Enums to Pascal case due to an issue on Playgrounds. See: solana-playground/solana-playground#191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test
Projects
None yet
Development

No branches or pull requests

2 participants