-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix decimals for OneInchSpotPrice estimator (#2603)
# Description OneInchSpotPrice estimator assumes that all tokens have 18 decimals. In order for `NativePriceEstimateResult` to be populated as expected, we need to divide the response by number of the decimals for each specific token. USDC example: https://production-6de61f.kb.eu-central-1.aws.cloud.es.io/app/r/s/EFIxv Here we can see that result was divided by 1e18 instead of 1e6, since USDC has 6 decimals. # Changes - [ ] Added token info fetching to OneInchSpotPrice estimator ## How to test Existing tests --------- Co-authored-by: MartinquaXD <[email protected]> (cherry picked from commit 98a4d11)
- Loading branch information
1 parent
2e6fbac
commit 69398b6
Showing
3 changed files
with
82 additions
and
21 deletions.
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
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
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