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(contract-client): stop jsifying method names #928

Closed
wants to merge 1 commit into from

Conversation

chadoh
Copy link
Contributor

@chadoh chadoh commented Mar 13, 2024

This implementation needs to match what is done in the TS Bindings in
Rust. Keeping "JSification" logic consistent in both is not worth the
slight nicety of allowing people to type camelCaseMethodNames in JS.

Additionally, having camelCaseMethodNames in one context when the real
method name is probably_snake_case could lead to confusion. If someone
types a camelCaseName in their CLI, the CLI will complain, and they
might not know what's going on.

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call!

@chadoh
Copy link
Contributor Author

chadoh commented Mar 13, 2024

Thanks! It fixes an edge case that came up in the TS bindings. See here: stellar/stellar-cli@45e5d95#diff-8bd2a1ceea4bc98b719f49e912e41213ac45e73e5e7adf8834cfbea622f742f5L37-L48

This implementation needs to match what is done in the TS Bindings in
Rust. Keeping "JSification" logic consistent in both is not worth the
slight nicety of allowing people to type camelCaseMethodNames in JS.

Additionally, having camelCaseMethodNames in one context when the real
method name is probably_snake_case could lead to confusion. If someone
types a camelCaseName in their CLI, the CLI will complain, and they
might not know what's going on.
@chadoh chadoh force-pushed the fix/no-jsification branch from 3450acb to 9b57279 Compare March 13, 2024 17:52
@chadoh
Copy link
Contributor Author

chadoh commented Mar 13, 2024

Thanks to @willemneal and @elizabethengelman for helping me decide that this was the best course of action.

@Shaptic merge when ready!

@chadoh
Copy link
Contributor Author

chadoh commented Mar 14, 2024

I've included this branch in the new PR to master #929, which will obsolesce the bindings branch and this PR

@chadoh chadoh closed this Mar 14, 2024
@chadoh chadoh deleted the fix/no-jsification branch March 14, 2024 14:48
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

Successfully merging this pull request may close these issues.

2 participants