From 4686e4ddcffdf372b10fef98cf394738fff5f0f3 Mon Sep 17 00:00:00 2001 From: Fabian Scherer <48454910+fabianschu@users.noreply.github.com> Date: Tue, 9 Apr 2024 15:35:22 +0200 Subject: [PATCH] chore: remove min swap amounts --- src/mappings/vault.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/mappings/vault.ts b/src/mappings/vault.ts index c528d39..ab8b5b3 100644 --- a/src/mappings/vault.ts +++ b/src/mappings/vault.ts @@ -669,12 +669,7 @@ export function handleSwapEvent(event: SwapEvent): void { let blockNumber = event.block.number; let tokenInWeight = poolTokenIn.weight; let tokenOutWeight = poolTokenOut.weight; - if ( - !isJoinExitSwap && - isPricingAsset(tokenInAddress) && - pool.totalLiquidity.gt(MIN_POOL_LIQUIDITY) && - valueUSD.gt(MIN_SWAP_VALUE_USD) - ) { + if (!isJoinExitSwap && isPricingAsset(tokenInAddress)) { let tokenPriceId = getTokenPriceId(poolId.toHex(), tokenOutAddress, tokenInAddress, blockNumber); let tokenPrice = new TokenPrice(tokenPriceId); //tokenPrice.poolTokenId = getPoolTokenId(poolId, tokenOutAddress); @@ -698,12 +693,7 @@ export function handleSwapEvent(event: SwapEvent): void { updateLatestPrice(tokenPrice, event.block.timestamp); } - if ( - !isJoinExitSwap && - isPricingAsset(tokenOutAddress) && - pool.totalLiquidity.gt(MIN_POOL_LIQUIDITY) && - valueUSD.gt(MIN_SWAP_VALUE_USD) - ) { + if (!isJoinExitSwap && isPricingAsset(tokenOutAddress)) { let tokenPriceId = getTokenPriceId(poolId.toHex(), tokenInAddress, tokenOutAddress, blockNumber); let tokenPrice = new TokenPrice(tokenPriceId); //tokenPrice.poolTokenId = getPoolTokenId(poolId, tokenInAddress);