Skip to content

Commit

Permalink
test: simpler condition for asymmetric deposit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoCentonze committed May 28, 2024
1 parent a8a5d1b commit 951eabc
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/unitary/pool/stateful/test_stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,11 @@ def add_liquidity_imbalanced(self, data, user: str):
)
)

# we need this because 1e14 is a minimum in the contracts
# for imbalance deposits. If we deposits two imbalanced amounts
# the smallest one should be at least 1e14.
# If the first deposit is smaller than 1e14 we set the second
# deposit to 0.
a1_min = 1e14 if a0 < 1e14 else 0

# deposit amount for coin 1
a1 = data.draw(
integers(
min_value=a1_min,
max_value=max(balances[1] * jump_limit, a1_min),
min_value=0,
max_value=balances[1] * jump_limit,
)
)

Expand Down

0 comments on commit 951eabc

Please sign in to comment.