Skip to content

Commit

Permalink
getBasicSwapGasLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino committed Sep 6, 2024
1 parent e4d7184 commit c17c1b0
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/utils/ethereumUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
} from '@/resources/assets/externalAssetsQuery';
import { ChainId, Network } from '@/chains/types';
import { AddressOrEth } from '@/__swaps__/types/assets';
import { chainsIdByName, chainsName, chainsNativeAsset, defaultChains } from '@/chains/chains';
import { chainsIdByName, chainsName, chainsNativeAsset, defaultChains, getChainGasUnits } from '@/chains/chains';
import { useConnectedToHardhatStore } from '@/state/connectedToHardhat';

const getNetworkNativeAsset = ({ chainId }: { chainId: ChainId }) => {
Expand Down Expand Up @@ -508,18 +508,7 @@ const calculateL1FeeOptimism = async (tx: RainbowTransaction, provider: Provider
};

const getBasicSwapGasLimit = (chainId: ChainId) => {
switch (chainId) {
case ChainId.arbitrum:
return ethUnits.basic_swap_arbitrum;
case ChainId.polygon:
return ethUnits.basic_swap_polygon;
case ChainId.bsc:
return ethUnits.basic_swap_bsc;
case ChainId.optimism:
return ethUnits.basic_swap_optimism;
default:
return ethUnits.basic_swap;
}
return Number(getChainGasUnits(chainId).basic.swap);
};

export default {
Expand Down

0 comments on commit c17c1b0

Please sign in to comment.