From 9b4c5e102ec5111e2c54570dbaa8f9d6584e973a Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Tue, 15 Oct 2024 03:15:03 -0400 Subject: [PATCH] fmt --- x/dex/keeper/place_limit_order.go | 1 - x/dex/types/pool.go | 2 -- 2 files changed, 3 deletions(-) diff --git a/x/dex/keeper/place_limit_order.go b/x/dex/keeper/place_limit_order.go index deb613f75..3099b0e0a 100644 --- a/x/dex/keeper/place_limit_order.go +++ b/x/dex/keeper/place_limit_order.go @@ -111,7 +111,6 @@ func (k Keeper) ExecutePlaceLimitOrder( var limitPrice math_utils.PrecDec limitPrice, err = types.CalcPrice(tickIndexInToOut) - if err != nil { return trancheKey, totalIn, swapInCoin, swapOutCoin, math.ZeroInt(), err } diff --git a/x/dex/types/pool.go b/x/dex/types/pool.go index 423477c2b..6d2593c88 100644 --- a/x/dex/types/pool.go +++ b/x/dex/types/pool.go @@ -267,7 +267,6 @@ func CalcAutoswapAmount( depositAmount1 math.Int, price1To0 math_utils.PrecDec, ) (resultAmount0, resultAmount1 math.Int) { - if reserves0.IsZero() && reserves1.IsZero() { // The pool is empty, any deposit amount is allowed. Nothing to be swapped return math.ZeroInt(), math.ZeroInt() @@ -292,7 +291,6 @@ func CalcAutoswapAmount( amountSwapped0 := amountSwappedAs1.Mul(price1To0) return amountSwapped0.Ceil().TruncateInt(), math.ZeroInt() } - } func (p *Pool) CalcAutoswapFee(depositValueAsToken0 math_utils.PrecDec) math_utils.PrecDec {