Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcompagni10 committed Sep 23, 2024
1 parent 8e40bbe commit da18547
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions app/upgrades/v5.0.0/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

v500 "github.com/neutron-org/neutron/v4/app/upgrades/v5.0.0"
"github.com/neutron-org/neutron/v4/testutil/common/sample"
math_utils "github.com/neutron-org/neutron/v4/utils/math"

"github.com/neutron-org/neutron/v4/testutil"
dexkeeper "github.com/neutron-org/neutron/v4/x/dex/keeper"
Expand All @@ -31,7 +30,7 @@ func (suite *UpgradeTestSuite) SetupTest() {
func (suite *UpgradeTestSuite) TestUpgradeDexPause() {
var (
app = suite.GetNeutronZoneApp(suite.ChainA)
ctx = suite.ChainA.GetContext()
ctx = suite.ChainA.GetContext().WithChainID("neutron-1")
msgServer = dexkeeper.NewMsgServerImpl(app.DexKeeper)
)

Expand All @@ -50,14 +49,16 @@ func (suite *UpgradeTestSuite) TestUpgradeDexPause() {

suite.True(params.Paused)

price := math_utils.OnePrecDec()
_, err := msgServer.PlaceLimitOrder(ctx, &dextypes.MsgPlaceLimitOrder{
Creator: sample.AccAddress(),
Receiver: sample.AccAddress(),
TokenIn: "TokenA",
TokenOut: "TokenB",
LimitSellPrice: &price,
AmountIn: math.OneInt(),
_, err := msgServer.Deposit(ctx, &dextypes.MsgDeposit{
Creator: sample.AccAddress(),
Receiver: sample.AccAddress(),
TokenA: "TokenA",
TokenB: "TokenB",
TickIndexesAToB: []int64{1},
Fees: []uint64{1},
AmountsA: []math.Int{math.OneInt()},
AmountsB: []math.Int{math.ZeroInt()},
Options: []*dextypes.DepositOptions{{}},
})

suite.ErrorIs(err, dextypes.ErrDexPaused)
Expand Down

0 comments on commit da18547

Please sign in to comment.