Skip to content

Commit

Permalink
fix: can not withdraw on ended tab (#1266)
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv authored Aug 19, 2022
1 parent 018a4c7 commit f98255b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/YieldPools/ProMMFarmModals/DepositModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function ProMMDepositNFTModal({
selectedFarmAddress: string
}) {
const qs = useParsedQueryString()
const tab = qs.tab || 'active'
const tab = qs.type || 'active'

const { account } = useActiveWeb3React()
const theme = useTheme()
Expand All @@ -162,6 +162,7 @@ function ProMMDepositNFTModal({
const poolAddresses = selectedFarm
?.filter(farm => (tab === 'active' ? farm.endTime > +new Date() / 1000 : farm.endTime < +new Date() / 1000))
.map(farm => farm.poolAddress.toLowerCase())

const [selectedNFTs, setSeletedNFTs] = useState<string[]>([])
const tokens = useTokens(selectedFarm.map(farm => [farm.token0, farm.token1]).reduce((arr, cur) => [...arr, ...cur]))

Expand Down

0 comments on commit f98255b

Please sign in to comment.