Skip to content

Commit

Permalink
Fix: add prefix when generating abi name properties (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakagri committed Aug 23, 2024
1 parent 1e8d87b commit 1086dc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 1086dc6

Please sign in to comment.