Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@sushiswap/wagmi / package / systems / PoolFinder / ConstantProductPool.tsx
Size: Mime:
import { Fee } from '@sushiswap/amm'
import { FC, useEffect } from 'react'

import { useConstantProductPool } from '../../hooks'
import { PoolFinderType, TridentPoolFinderProps } from './types'

export const ConstantProductPool: FC<TridentPoolFinderProps> = ({
  chainId,
  dispatch,
  token0,
  token1,
  index,
  fee = Fee.DEFAULT,
  twap = false,
}) => {
  const state = useConstantProductPool(chainId, token0, token1, fee, twap)

  useEffect(() => {
    if (!dispatch || index === undefined) return

    dispatch({
      type: 'update',
      payload: {
        state,
        index,
        poolType: PoolFinderType.Classic,
      },
    })
  }, [dispatch, index, state])

  return <></>
}