Skip to content

Commit

Permalink
fix main (osmosis-labs#5741)
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic authored Jul 3, 2023
1 parent 8e2b5b5 commit fad138b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/concentrated-liquidity/range_test.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/osmosis-labs/osmosis/osmomath"
"github.com/osmosis-labs/osmosis/v16/app/apptesting"
"github.com/osmosis-labs/osmosis/v16/x/concentrated-liquidity/math"
"github.com/osmosis-labs/osmosis/v16/x/concentrated-liquidity/types"
@@ -347,8 +348,8 @@ func (s *KeeperTestSuite) executeRandomizedSwap(pool types.ConcentratedPoolExten
pool, err := s.clk.GetPoolById(s.Ctx, pool.GetId())
s.Require().NoError(err)

poolSpotPrice := pool.GetCurrentSqrtPrice().Power(2)
minSwapOutAmount := poolSpotPrice.Mul(sdk.SmallestDec()).TruncateInt()
poolSpotPrice := pool.GetCurrentSqrtPrice().PowerInteger(2)
minSwapOutAmount := poolSpotPrice.Mul(osmomath.SmallestDec()).TruncateDec().SDKDec().TruncateInt()
poolBalances := s.App.BankKeeper.GetAllBalances(s.Ctx, pool.GetAddress())
if poolBalances.AmountOf(swapOutDenom).LTE(minSwapOutAmount) {
return sdk.Coin{}, sdk.Coin{}

0 comments on commit fad138b

Please sign in to comment.