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

Fix: add prefix when generating abi name properties #91

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion core/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ impl ABIInput {
.iter()
.flat_map(|input| {
if let Some(components) = &input.components {
let new_prefix = match prefix {
Some(p) => format!("{}_{}", p, camel_to_snake(&input.name)),
None => camel_to_snake(&input.name),
};
ABIInput::generate_abi_name_properties(
components,
properties_type,
Some(&camel_to_snake(&input.name)),
Some(&new_prefix),
)
} else {
match properties_type {
Expand Down
1 change: 1 addition & 0 deletions documentation/docs/pages/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Bug fixes
-------------------------------------------------
fix: Use the prefix when generating abi name properties.

### Breaking changes
-------------------------------------------------
Expand Down
Loading