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

Increase default precision #379

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EVODelavega
Copy link

The addition of the PowPrecisionNegativeExponent variable in version 1.4 changes the behaviour of Pow significantly. In my use-case, I rely on Pow to convert amounts to and from a human-readable format and the same amount in the asset precision. When dealing with crypto (e.g. ETH), 18 decimal places is the de-facto norm.

Having this package default to a seemingly arbitrary precision of 16, especially for negative exponents makes little sense, defaults of 18 means this package can be used without having to rely on messy things like changing global variables to tweak the behaviour in an init function

@yordis
Copy link

yordis commented Dec 20, 2024

@mwoss any opportunity to review this one? I just came across the same situation in the crypto space

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