Skip to content

Commit

Permalink
chore: corrected variable name
Browse files Browse the repository at this point in the history
The codebase often refers to `packed_price_scale` when the variable actually only contains one price_scale (probably a left-over from tricrypto-ng).
  • Loading branch information
AlbertoCentonze committed Jun 13, 2024
1 parent d33ba9c commit 71d840d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/main/CurveTwocrypto.vy
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ event TokenExchange:
bought_id: uint256
tokens_bought: uint256
fee: uint256
packed_price_scale: uint256
price_scale: uint256

event AddLiquidity:
provider: indexed(address)
token_amounts: uint256[N_COINS]
fee: uint256
token_supply: uint256
packed_price_scale: uint256
price_scale: uint256

event RemoveLiquidity:
provider: indexed(address)
Expand All @@ -91,7 +91,7 @@ event RemoveLiquidityOne:
coin_index: uint256
coin_amount: uint256
approx_fee: uint256
packed_price_scale: uint256
price_scale: uint256

event NewParameters:
mid_fee: uint256
Expand Down Expand Up @@ -681,7 +681,7 @@ def remove_liquidity_one_coin(
# Burn user's tokens:
self.burnFrom(msg.sender, token_amount)

packed_price_scale: uint256 = self.tweak_price(A_gamma, xp, D)
price_scale: uint256 = self.tweak_price(A_gamma, xp, D)
# Safe to use D from _calc_withdraw_one_coin here ---^

# ------------------------- Transfers ------------------------------------
Expand All @@ -691,7 +691,7 @@ def remove_liquidity_one_coin(
self._transfer_out(i, dy, receiver)

log RemoveLiquidityOne(
msg.sender, token_amount, i, dy, approx_fee, packed_price_scale
msg.sender, token_amount, i, dy, approx_fee, price_scale
)

return dy
Expand Down

0 comments on commit 71d840d

Please sign in to comment.