Skip to content

Commit

Permalink
Fix fetching quotes on Optimism
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire committed Dec 12, 2024
1 parent f3c4cc2 commit 7c32a0e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/util/networks/engineNetworkUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Engine from '../../core/Engine';
import { convertHexToDecimal } from '@metamask/controller-utils';
import { TransactionMeta } from '@metamask/transaction-controller';
import { NetworkClientId } from '@metamask/network-controller';
import { TransactionMeta, TransactionParams } from '@metamask/transaction-controller';
import { isStrictHexString } from '@metamask/utils';

/**
Expand Down Expand Up @@ -42,14 +43,15 @@ export function toggleUseSafeChainsListValidation(value: boolean): void {
*/
export const fetchEstimatedMultiLayerL1Fee = async (
_: unknown,
txMeta: TransactionMeta,
{ txParams, networkClientId }: {
txParams: TransactionParams,
networkClientId: NetworkClientId,
}
) => {
const chainId = txMeta.chainId;

const layer1GasFee =
await Engine.context.TransactionController.getLayer1GasFee({
transactionParams: txMeta.txParams,
chainId,
transactionParams: txParams,
networkClientId,
});

const layer1GasFeeNoPrefix = layer1GasFee?.startsWith('0x')
Expand Down

0 comments on commit 7c32a0e

Please sign in to comment.