Skip to content

Commit

Permalink
fix: classic pool filter (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
namgold authored Oct 23, 2023
1 parent ce2c5ed commit b0d15d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/PoolList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,21 @@ const PoolList = ({ currencies, searchValue, isShowOnlyActiveFarmPools, onlyShow
const wca = ca.wrapped
const wcaAddress = wca && wca.address.toLowerCase()
res = res.filter(
poolData => wcaAddress && (poolData.token0.address === wcaAddress || poolData.token1.address === wcaAddress),
poolData =>
wcaAddress &&
(poolData.token0.address.toLowerCase() === wcaAddress ||
poolData.token1.address.toLowerCase() === wcaAddress),
)
}

if (cb) {
const wcb = cb.wrapped
const wcbAddress = wcb && wcb.address.toLowerCase()
res = res.filter(
poolData => wcbAddress && (poolData.token0.address === wcbAddress || poolData.token1.address === wcbAddress),
poolData =>
wcbAddress &&
(poolData.token0.address.toLowerCase() === wcbAddress ||
poolData.token1.address.toLowerCase() === wcbAddress),
)
}

Expand Down

0 comments on commit b0d15d0

Please sign in to comment.