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

The type checks in these two lines of Python can probably be removed. #56

Open
lyciumlee opened this issue Dec 6, 2023 · 0 comments
Open

Comments

@lyciumlee
Copy link

if(not isinstance(weights[key],Decimal)):

https://github.com/balancer/balpy/blob/77d787a06b147aab40c0d08d22af11846b5e989b/balpy/balancerv2cad/src/balancerv2cad/WeightedPool.py#L46C16-L46C16

If the user of the library wants to ensure that the input integers do not lose precision, they must pass in a string of a floating-point number to trigger the logic of factory_fees.update. This approach is quite unintuitive, as externally one could directly pass in a Decimal data

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

No branches or pull requests

1 participant