fix: sweep adding the correct assets from amms (#5424)

WEB-2438 sudo and nftx fixes
This commit is contained in:
Jack Short 2022-11-29 12:53:34 -05:00 committed by GitHub
parent 57371fb47e
commit 9d37b1bb55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -198,7 +198,7 @@ export const Sweep = ({ contractAddress, minPrice, maxPrice }: SweepProps) => {
if (nft20Assets) jointCollections = [...jointCollections, ...nft20Assets]
const sudoSwapAssetsInJointCollections = jointCollections.filter(
(sweepAsset) => sweepAsset.marketplace === Markets.Sudoswap
(sweepAsset) => sweepAsset.marketplace === Markets.Sudoswap && !sweepAsset.susFlag
)
jointCollections.forEach((asset) => {
@ -216,8 +216,8 @@ export const Sweep = ({ contractAddress, minPrice, maxPrice }: SweepProps) => {
const poolPrice = calcPoolPrice(asset, isNFTX ? counterNFTX : counterNFT20)
if (BigNumber.from(poolPrice).gt(0)) {
isNFTX ? counterNFTX++ : counterNFT20++
asset.priceInfo.ETHPrice = poolPrice
}
asset.priceInfo.ETHPrice = poolPrice
}
}
})