DRY-ify humanized amounts + Add "scaleUp" + Fix tokenA decimals#10
Open
PaulRBerg wants to merge 2 commits intopods-finance:masterfrom
Open
DRY-ify humanized amounts + Add "scaleUp" + Fix tokenA decimals#10PaulRBerg wants to merge 2 commits intopods-finance:masterfrom
PaulRBerg wants to merge 2 commits intopods-finance:masterfrom
Conversation
feat: add "scaleUp" utility fix: use tokenA decimals in tokenA amounts refactor: dry-ify calculations in "entities/helper.ts" with "scaleUp" refactor: make "humanize" function accept "BigNumber | number"
Contributor
|
Please make sure to conduct further analysis before merging this commit. While some of the optimizations and dry-ification of the code is correct, a part of this PR isn't correct due to a technical misunderstanding of the variables' scope. I've reached out to Paul and explained and will continue his work and add fixes during the next weeks as I return to work. |
Author
|
I think that the only changes that have to be reverted are the use of the tokenB decimals. Luckily I have written an exhaustive list of those changes in #9, so I just undid them in my latest commit. The PR should be good to be merged now, unless there are other mistakes. Will wait for your review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog:
scaleUputilityhumanizedvariable calculationsentities/helper.tswithscaleUpFix use tokenA decimals in tokenA amountsBigNumber | numberAddresses #7, #8 and #9.