Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions src/SwapsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,10 @@ export default class SwapsController extends BaseControllerV1<
options?: FetchGasFeeEstimateOptions,
) => Promise<GasFeeState | undefined>;

private readonly fetchEstimatedMultiLayerL1Fee?: (
eth: any,
options: {
txParams: TransactionParams;
chainId: Hex;
},
) => Promise<string | undefined>;
private readonly fetchEstimatedMultiLayerL1Fee?: (options: {
txParams: TransactionParams;
chainId: Hex;
}) => Promise<string | undefined>;

/**
* Fetch current gas price
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -825,13 +822,10 @@ export default class SwapsController extends BaseControllerV1<
fetchEstimatedMultiLayerL1Fee,
}: {
fetchGasFeeEstimates?: () => Promise<GasFeeState | undefined>;
fetchEstimatedMultiLayerL1Fee?: (
eth: EthQuery,
options: {
txParams: TransactionParams;
chainId: Hex;
},
) => Promise<string | undefined>;
fetchEstimatedMultiLayerL1Fee?: (options: {
txParams: TransactionParams;
chainId: Hex;
}) => Promise<string | undefined>;
},
config?: Partial<SwapsConfig>,
state?: Partial<SwapsState>,
Expand Down