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

Allow both camelCase and snake_case arguments #2787

Open
kclowes opened this issue Jan 20, 2023 · 0 comments
Open

Allow both camelCase and snake_case arguments #2787

kclowes opened this issue Jan 20, 2023 · 0 comments

Comments

@kclowes
Copy link
Collaborator

kclowes commented Jan 20, 2023

What was wrong?

We've switched the whole code base over to utilize snake_case now. However, we opted to keep some of the keyword arguments, and dictionary keys (specifically transaction and filter params) that get passed directly to the JSON-RPC endpoints as camelCase. We thought it would be more confusing if an error came back from the node provider with a camelCase param when a snake_case param got passed in. But, it's confusing and unintuitive that there are still some residual camelCase params sticking around. It would be most convenient if we could accept both.

How can it be fixed?

Explore how difficult it might be to accept both snake_case and camelCase params. This might be in the form of new middleware or adding to the existing pythonic middleware or possibly something else.

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

No branches or pull requests

1 participant