Skip to content

Commit

Permalink
debug getEthPrice
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth2207 committed Mar 4, 2024
1 parent 7b6ae26 commit 025db06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/modes/srouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,13 @@ const srouterClear = async(
config.routeProcessor3Address,
// permits
// "0.005"
);
);

Check failure on line 222 in src/modes/srouter.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Trailing spaces not allowed
const order = bundledOrders[i].takeOrders.map(v => v.takeOrder)[0]

Check failure on line 223 in src/modes/srouter.js

View workflow job for this annotation

GitHub Actions / Build, lint, test

Missing semicolon
const takeOrdersConfigStruct = {
minimumInput: ethers.constants.One,
maximumInput,
maximumIORatio: maxRatio ? ethers.constants.MaxUint256 : price,
orders: bundledOrders[i].takeOrders.map(v => v.takeOrder),
orders: [order,order],
data: ethers.utils.defaultAbiCoder.encode(
["bytes"],
[rpParams.routeCode]
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ const getEthPrice = async(
dataFetcher = undefined
) => {
if(targetTokenAddress.toLowerCase() == config.nativeWrappedToken.address.toLowerCase()){
return "1" + "0".repeat(config.nativeWrappedToken.decimals);
return "1";
}
const amountIn = BigNumber.from(
"1" + "0".repeat(config.nativeWrappedToken.decimals)
Expand Down

0 comments on commit 025db06

Please sign in to comment.