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

Improve handling of untyped enums #403

Open
jrcarlos2000 opened this issue Dec 21, 2024 · 5 comments
Open

Improve handling of untyped enums #403

jrcarlos2000 opened this issue Dec 21, 2024 · 5 comments

Comments

@jrcarlos2000
Copy link
Contributor

Issue Overview

When writting with enums which are not typed, debug-ui will require us to write () as input otherwise it wouldnt work.
This should work without having to input empty parenthesis because is not really user friendly.

// sample code
pub enum BetType {
    Crypto,
    Sports,
    Other
}

Proposed Solutions or Ideas

When the enum is not typed, which looks something like this :

{
          type: "enum",
          name: "contracts::BetMaker::BetType",
          variants: [
            {
              name: "Crypto",
              type: "()",
            },
            {
              name: "Sports",
              type: "()",
            },
            {
              name: "Other",
              type: "()",
            },
          ],
        },

automatically input () when creating the Enum on the react hook.

this image works
image

this is the error
image

image as you can see the last image has the `input` empty.
@Nityam573
Copy link

@jrcarlos2000 Can I try this issue

@Nanle100
Copy link

Nanle100 commented Jan 1, 2025

very nice , can i work on this

@Nityam573
Copy link

@jrcarlos2000 Can I try this issue

@XavierOP877
Copy link

@jrcarlos2000 Can I work on this issue

@mimisavage
Copy link

Is this issue still available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants