@@ -2,7 +2,7 @@ import { Block, Provider } from '@ethersproject/abstract-provider';
2
2
import { MaxUint256 } from '@ethersproject/constants' ;
3
3
import { Contract , PopulatedTransaction } from '@ethersproject/contracts' ;
4
4
import { StaticJsonRpcProvider } from '@ethersproject/providers' ;
5
- import { ALLOWS_PERMIT , CrosschainQuote , Quote , getQuoteExecutionDetails , getRainbowRouterContractAddress } from '@rainbow-me/swaps' ;
5
+ import { CrosschainQuote , Quote , getQuoteExecutionDetails , getRainbowRouterContractAddress } from '@rainbow-me/swaps' ;
6
6
import { mainnet } from 'viem/chains' ;
7
7
import { Chain , erc20Abi } from 'viem' ;
8
8
import { GasFeeParamsBySpeed , LegacyGasFeeParamsBySpeed , LegacyTransactionGasParamAmounts , TransactionGasParamAmounts } from '@/entities' ;
@@ -140,14 +140,7 @@ const getClosestGasEstimate = async (estimationFn: (gasEstimate: number) => Prom
140
140
} ;
141
141
142
142
export const getDefaultGasLimitForTrade = ( quote : Quote , chainId : Chain [ 'id' ] ) : string => {
143
- const allowsPermit = chainId === mainnet . id && ALLOWS_PERMIT [ quote ?. sellTokenAddress ?. toLowerCase ( ) ] ;
144
-
145
- let defaultGasLimit = quote ?. defaultGasLimit ;
146
-
147
- if ( allowsPermit ) {
148
- defaultGasLimit = Math . max ( Number ( defaultGasLimit ) , Number ( multiply ( gasUnits . basic_swap_permit , EXTRA_GAS_PADDING ) ) ) . toString ( ) ;
149
- }
150
- return defaultGasLimit || multiply ( gasUnits . basic_swap [ chainId ] , EXTRA_GAS_PADDING ) ;
143
+ return quote ?. defaultGasLimit || multiply ( gasUnits . basic_swap [ chainId ] , EXTRA_GAS_PADDING ) ;
151
144
} ;
152
145
153
146
export const estimateSwapGasLimitWithFakeApproval = async (
0 commit comments