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

Incorrect coder matching from namespaced library #3161

Closed
petertonysmith94 opened this issue Sep 13, 2024 · 0 comments · Fixed by #3162
Closed

Incorrect coder matching from namespaced library #3161

petertonysmith94 opened this issue Sep 13, 2024 · 0 comments · Fixed by #3162
Assignees
Labels
bug Issue is a bug

Comments

@petertonysmith94
Copy link
Contributor

Summary

Consider the library, with the generated ABI type of enum data_structures::order_change::OrderChangeType:

// Namespaced to "data_structures.order_change"
library;

pub enum OrderChangeType {
    OrderOpened: (),
    OrderCancelled: (),
    OrderMatched: (),
}

Incoming from the forum.

Actual

Currently, this type will match to a StructCoder due to the struct in the namespace.

Expected

Should match to an EnumCoder.

Solution

Our RegEx on ABI types should match to the start of the string.

@petertonysmith94 petertonysmith94 self-assigned this Sep 13, 2024
@petertonysmith94 petertonysmith94 added the bug Issue is a bug label Sep 13, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant