Skip to content

Commit

Permalink
Revert "chore: Remove farm prop"
Browse files Browse the repository at this point in the history
This reverts commit 4db1516.
  • Loading branch information
memoyil committed Dec 19, 2024
1 parent 4db1516 commit 7e8c233
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/web/src/components/ZapLiquidityWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import CurrencySearchModal from 'components/SearchModal/CurrencySearchModal'
import { CommonBasesType } from 'components/SearchModal/types'
import { isAddressEqual } from 'utils'
import WalletModalManager from 'components/WalletModalManager'
import { useMasterchefV3 } from 'hooks/useContract'

interface ZapLiquidityProps {
tickLower?: number
Expand Down Expand Up @@ -84,6 +85,10 @@ export const ZapLiquidityWidget: React.FC<ZapLiquidityProps> = ({

const handleOnWalletConnect = useCallback(() => setIsWalletModalOpen(true), [])

const masterChefV3 = useMasterchefV3()

const masterChefV3Addresses = useMemo(() => (masterChefV3 ? [masterChefV3.address] : undefined), [masterChefV3])

const handleOnClick = useCallback(() => {
setDepositTokens(
[
Expand Down Expand Up @@ -230,6 +235,7 @@ export const ZapLiquidityWidget: React.FC<ZapLiquidityProps> = ({
initAmounts={amounts}
initDepositTokens={depositTokens}
poolAddress={poolAddress ?? '0x'}
farmContractAddresses={masterChefV3Addresses}
onConnectWallet={handleOnWalletConnect}
onAddTokens={handleAddTokens}
onOpenTokenSelectModal={onPresentCurrencyModal}
Expand Down

0 comments on commit 7e8c233

Please sign in to comment.