Skip to content

Commit

Permalink
fix getEthPrice
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth2207 committed Feb 6, 2024
1 parent dee252e commit 81c77ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,13 +960,13 @@ const getEthPrice = async(
targetTokenDecimals,
gasPrice,
dataFetcher = undefined
) => {
) => {
if(targetTokenAddress.toLowerCase() == config.nativeWrappedToken.address.toLowerCase()){
return "1" + "0".repeat(config.nativeWrappedToken.decimals)

Check failure on line 965 in src/utils.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Missing semicolon

Check failure on line 965 in src/utils.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Missing semicolon
}

Check failure on line 966 in src/utils.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Trailing spaces not allowed

Check failure on line 966 in src/utils.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Trailing spaces not allowed
const amountIn = BigNumber.from(
"1" + "0".repeat(config.nativeWrappedToken.decimals)
);

Check failure on line 969 in src/utils.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Trailing spaces not allowed

Check failure on line 969 in src/utils.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Trailing spaces not allowed
if(targetTokenAddress.toLowerCase() == config.nativeWrappedToken.address.toLowerCase()){
return ethers.utils.formatUnits(amountIn, config.nativeWrappedToken.decimals);
}
const fromToken = new Token({
chainId: config.chainId,
decimals: config.nativeWrappedToken.decimals,
Expand Down

0 comments on commit 81c77ab

Please sign in to comment.