-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(framework): adjust setDirectPrice for decimals in simulations
Problem: setDirectPrice does not directly set the returned value of the getPrice function. Rather, it is implied that the price is scaled by 1e18. Thus, when we call getPrice, extra zeros get appended to the price for tokens with < 18 decimals. Solution: Do a reverse scaling, i.e. divide by 10**(18 - decimals)
- Loading branch information
Showing
1 changed file
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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