@@ -13,6 +13,7 @@ import { useActiveWeb3React } from 'hooks';
1313import { useUSDCValue } from 'hooks/v3/useUSDCPrice' ;
1414import {
1515 NONFUNGIBLE_POSITION_MANAGER_ADDRESSES ,
16+ NONFUNGIBLE_POSITION_V4_MANAGER_ADDRESSES ,
1617 UNI_NFT_POSITION_MANAGER_ADDRESS ,
1718} from 'constants/v3/addresses' ;
1819import { halfAmountSpend , maxAmountSpend } from 'utils/v3/maxAmountSpend' ;
@@ -26,6 +27,7 @@ import { GlobalConst } from 'constants/index';
2627import { useTranslation } from 'react-i18next' ;
2728import { getGammaPairsForTokens } from 'utils' ;
2829import { useSteerPeripheryContract } from 'hooks/useContract' ;
30+ import { useIsV4 } from 'state/application/hooks' ;
2931
3032interface IEnterAmounts {
3133 currencyA : Currency | undefined ;
@@ -42,6 +44,7 @@ export function EnterAmounts({
4244} : IEnterAmounts ) {
4345 const { t } = useTranslation ( ) ;
4446 const { chainId } = useActiveWeb3React ( ) ;
47+ const { isV4 } = useIsV4 ( ) ;
4548 const preset = useActivePreset ( ) ;
4649
4750 const { independentField, typedValue } = useV3MintState ( ) ;
@@ -133,8 +136,10 @@ export function EnterAmounts({
133136 if ( mintInfo . feeTier && mintInfo . feeTier . id . includes ( 'uni' ) ) {
134137 return UNI_NFT_POSITION_MANAGER_ADDRESS [ chainId ] ;
135138 }
136- return NONFUNGIBLE_POSITION_MANAGER_ADDRESSES [ chainId ] ;
137- } , [ chainId , mintInfo . feeTier ] ) ;
139+ return isV4
140+ ? NONFUNGIBLE_POSITION_V4_MANAGER_ADDRESSES [ chainId ]
141+ : NONFUNGIBLE_POSITION_MANAGER_ADDRESSES [ chainId ] ;
142+ } , [ chainId , mintInfo . feeTier , isV4 ] ) ;
138143
139144 const steerPeripheryContract = useSteerPeripheryContract ( ) ;
140145 const [ approvalA , approveACallback ] = useApproveCallback (
0 commit comments