From 20566c2245384e144f29bf627b18480520b28e6f Mon Sep 17 00:00:00 2001 From: IF <139582705+infiniteflower@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:15:51 -0400 Subject: [PATCH] chore: remove need for eth object in fetchEstimatedMultiLayerL1Fee --- src/SwapsController.ts | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/SwapsController.ts b/src/SwapsController.ts index 92c0f783..0ada0a18 100644 --- a/src/SwapsController.ts +++ b/src/SwapsController.ts @@ -239,13 +239,10 @@ export default class SwapsController extends BaseControllerV1< options?: FetchGasFeeEstimateOptions, ) => Promise; - private readonly fetchEstimatedMultiLayerL1Fee?: ( - eth: any, - options: { - txParams: TransactionParams; - chainId: Hex; - }, - ) => Promise; + private readonly fetchEstimatedMultiLayerL1Fee?: (options: { + txParams: TransactionParams; + chainId: Hex; + }) => Promise; /** * Fetch current gas price @@ -698,7 +695,7 @@ export default class SwapsController extends BaseControllerV1< Object.values(quotes).map(async (quote) => { if (quote.trade && this.fetchEstimatedMultiLayerL1Fee) { const multiLayerL1TradeFeeTotal = - await this.fetchEstimatedMultiLayerL1Fee(this.ethQuery, { + await this.fetchEstimatedMultiLayerL1Fee({ txParams: quote.trade, chainId, }); @@ -825,13 +822,10 @@ export default class SwapsController extends BaseControllerV1< fetchEstimatedMultiLayerL1Fee, }: { fetchGasFeeEstimates?: () => Promise; - fetchEstimatedMultiLayerL1Fee?: ( - eth: EthQuery, - options: { - txParams: TransactionParams; - chainId: Hex; - }, - ) => Promise; + fetchEstimatedMultiLayerL1Fee?: (options: { + txParams: TransactionParams; + chainId: Hex; + }) => Promise; }, config?: Partial, state?: Partial,