Skip to content

Commit

Permalink
Lint cryptoswap D_to_balances
Browse files Browse the repository at this point in the history
  • Loading branch information
nagakingg committed Jul 10, 2023
1 parent abe030c commit a9d2540
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions curvesim/iterators/param_samplers/pool_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ def cryptoswap_D_to_balances(pool, D):
price_scale = pool.price_scale
precisions = pool.precisions

if n==2:
if n == 2:
price_scale = [price_scale]

balances = [D // n // precisions[0]]
divisors = zip(price_scale, precisions[1:])
balances += [D * 10**18 // (n * price) // prec for price, prec in divisors]

pool.balances = balances

0 comments on commit a9d2540

Please sign in to comment.