From 53b02fc72b95b2e0290063e8687b5d9c35b4c0c8 Mon Sep 17 00:00:00 2001 From: Vasilis Xouris Date: Tue, 3 Dec 2024 12:55:27 -0800 Subject: [PATCH] prettier --- .../tick-based-heuristic-gas-model.ts | 23 +++++++++++++------ src/util/chains.ts | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/routers/alpha-router/gas-models/tick-based-heuristic-gas-model.ts b/src/routers/alpha-router/gas-models/tick-based-heuristic-gas-model.ts index 6db64310b..943efd433 100644 --- a/src/routers/alpha-router/gas-models/tick-based-heuristic-gas-model.ts +++ b/src/routers/alpha-router/gas-models/tick-based-heuristic-gas-model.ts @@ -6,7 +6,7 @@ import { CurrencyAmount, log, STABLE_COINS_BY_CHAIN_ID, - WRAPPED_NATIVE_CURRENCY + WRAPPED_NATIVE_CURRENCY, } from '../../../util'; import { calculateL1GasFeesHelper } from '../../../util/gas-factory-helpers'; import { V3RouteWithValidQuote, V4RouteWithValidQuote } from '../entities'; @@ -184,7 +184,7 @@ export abstract class TickBasedHeuristicGasModelFactory< routeWithValidQuote.amount.currency, routeWithValidQuote.quote.currency, routeWithValidQuote.amount.quotient, - routeWithValidQuote.amount.quotient, + routeWithValidQuote.amount.quotient ); } @@ -196,7 +196,8 @@ export abstract class TickBasedHeuristicGasModelFactory< : nativeAmountPool.token1Price; // gasCostInTermsOfAmountToken = 29.487425 | 11.0 - const gasCostInTermsOfAmountToken = nativeAndAmountTokenPrice.quote( // nativeAndAmountTokenPrice = 3554.58 + const gasCostInTermsOfAmountToken = nativeAndAmountTokenPrice.quote( + // nativeAndAmountTokenPrice = 3554.58 totalGasCostNativeCurrency ) as CurrencyAmount; @@ -204,7 +205,8 @@ export abstract class TickBasedHeuristicGasModelFactory< let syntheticGasCostInTermsOfQuoteToken: CurrencyAmount | null; try { // syntheticGasCostInTermsOfQuoteToken = 29 | 19 | 11 - syntheticGasCostInTermsOfQuoteToken = executionPrice.quote( // executionPrice = 0.99 + syntheticGasCostInTermsOfQuoteToken = executionPrice.quote( + // executionPrice = 0.99 gasCostInTermsOfAmountToken ); } catch (err) { @@ -276,11 +278,18 @@ export abstract class TickBasedHeuristicGasModelFactory< }; } - protected routeIsStableCoinPair(chainId: ChainId, routeWithValidQuote: TRouteWithValidQuote): boolean { + protected routeIsStableCoinPair( + chainId: ChainId, + routeWithValidQuote: TRouteWithValidQuote + ): boolean { const stableCoins = STABLE_COINS_BY_CHAIN_ID[chainId] || []; return ( - stableCoins.includes(routeWithValidQuote.amount.currency.wrapped.address.toLowerCase()) && - stableCoins.includes(routeWithValidQuote.quote.currency.wrapped.address.toLowerCase()) + stableCoins.includes( + routeWithValidQuote.amount.currency.wrapped.address.toLowerCase() + ) && + stableCoins.includes( + routeWithValidQuote.quote.currency.wrapped.address.toLowerCase() + ) ); } diff --git a/src/util/chains.ts b/src/util/chains.ts index 91dd8dcc1..c2bfd7de7 100644 --- a/src/util/chains.ts +++ b/src/util/chains.ts @@ -173,7 +173,7 @@ export const STABLE_COINS_BY_CHAIN_ID: { [chainId: number]: string[] } = { '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI '0xdac17f958d2ee523a2206206994597c13d831ec7', // USDT ], -} +}; export const NATIVE_NAMES_BY_ID: { [chainId: number]: string[] } = { [ChainId.MAINNET]: [