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

Add 'rounding down' support to pow to mimic our powDecimal function in solidity. #92

Open
jcmonte opened this issue Sep 30, 2021 · 0 comments
Labels

Comments

@jcmonte
Copy link
Contributor

jcmonte commented Sep 30, 2021

Wei's pow uses Big.js pow which uses the currently set rounding mode. Default Big.js rounding mode is round up. This is a problem because our powDecimal in solidity rounds down (truncation).

pow(p: number): Wei {

https://github.com/Synthetixio/synthetix/blob/645a49c07c148d1cef91aafb95e0e05a0f103740/contracts/Math.sol#L17-L29

@jcmonte jcmonte added the wei label Sep 30, 2021
noisekit pushed a commit that referenced this issue Aug 10, 2022
fix(button): background clip text doesnt work on safari when wrapped …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant