From a5de0810b95a2c2f20883de1cd7c8354522eb3cf Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Thu, 26 Dec 2024 04:13:07 +0000 Subject: [PATCH] Revert "test" This reverts commit a9078be548c953150d85818e9d7771e980fbe878. --- src/modes/routeProcessor.ts | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/modes/routeProcessor.ts b/src/modes/routeProcessor.ts index d1bacf56..bf2958a0 100644 --- a/src/modes/routeProcessor.ts +++ b/src/modes/routeProcessor.ts @@ -540,23 +540,6 @@ export function findMaxInput({ const result: BigNumber[] = []; const ratio = orderPairObject.takeOrders[0].quote!.ratio; const pcMap = dataFetcher.getCurrentPoolCodeMap(fromToken, toToken); - if ( - fromToken.address.toLowerCase() === - "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() || - toToken.address.toLowerCase() === "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() - ) { - pcMap.forEach((x) => { - if ( - x.pool.token0.address.toLowerCase() === - "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() || - x.pool.token1.address.toLowerCase() === - "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() - ) { - // eslint-disable-next-line no-console - console.log(x); - } - }); - } const initAmount = scale18To(maximumInputFixed, fromToken.decimals).div(2); let maximumInput = BigNumber.from(initAmount.toString()); for (let i = 1; i < 26; i++) { @@ -575,26 +558,8 @@ export function findMaxInput({ ); if (route.status == "NoWay") { - if ( - fromToken.address.toLowerCase() === - "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() || - toToken.address.toLowerCase() === - "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() - ) { - // eslint-disable-next-line no-console - console.log("noway", maximumInput.toString()); - } maximumInput = maximumInput.sub(initAmount.div(2 ** i)); } else { - if ( - fromToken.address.toLowerCase() === - "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() || - toToken.address.toLowerCase() === - "0xb02541995f317fd47c5df8e8fba7284b502b5d7b".toLowerCase() - ) { - // eslint-disable-next-line no-console - console.log("way", maximumInput.toString()); - } const amountOut = scale18(route.amountOutBI, toToken.decimals); const price = amountOut.mul("1" + "0".repeat(18)).div(maxInput18);