Skip to content

Commit

Permalink
Merge pull request #6 from Kolektivo-Labs/chore/remove-min-amounts
Browse files Browse the repository at this point in the history
chore: remove min swap amounts
  • Loading branch information
fabianschu authored Apr 9, 2024
2 parents 4199b4f + 4686e4d commit e4eb5e6
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/mappings/vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit e4eb5e6

Please sign in to comment.