Skip to content

Commit

Permalink
refactor: Replace deprecated simapp.MakeTestEncodingConfig with modul…
Browse files Browse the repository at this point in the history
…etestutil.MakeTestEncodingConfig

The simapp.MakeTestEncodingConfig function has been deprecated and removed. Updated the tests to use moduletestutil.MakeTestEncodingConfig instead, which requires a series of relevant AppModuleBasic as input, including the module being tested and any potential dependencies. This change ensures that the test configuration is up-to-date and compatible with the latest SDK standards.
  • Loading branch information
poorphd authored and zsystm committed Jul 11, 2024
1 parent 5b9e51a commit 0a7aad4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/coinswap/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (

errorsmod "cosmossdk.io/errors"
sdkmath "cosmossdk.io/math"
simappparams "cosmossdk.io/simapp/params"
"github.com/Canto-Network/Canto/v7/x/coinswap/keeper"
"github.com/Canto-Network/Canto/v7/x/coinswap/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
)
Expand Down Expand Up @@ -174,7 +174,7 @@ func SimulateMsgAddLiquidity(k keeper.Keeper, ak types.AccountKeeper, bk types.B
}
}

txGen := simappparams.MakeTestEncodingConfig().TxConfig
txGen := moduletestutil.MakeTestEncodingConfig().TxConfig

tx, err := simtestutil.GenSignedMockTx(
r,
Expand Down Expand Up @@ -329,7 +329,7 @@ func SimulateMsgSwapOrder(k keeper.Keeper, ak types.AccountKeeper, bk types.Bank
}
}

txGen := simappparams.MakeTestEncodingConfig().TxConfig
txGen := moduletestutil.MakeTestEncodingConfig().TxConfig
tx, err := simtestutil.GenSignedMockTx(
r,
txGen,
Expand Down Expand Up @@ -437,7 +437,7 @@ func SimulateMsgRemoveLiquidity(k keeper.Keeper, ak types.AccountKeeper, bk type
}
}

txGen := simappparams.MakeTestEncodingConfig().TxConfig
txGen := moduletestutil.MakeTestEncodingConfig().TxConfig

tx, err := simtestutil.GenSignedMockTx(
r,
Expand Down

0 comments on commit 0a7aad4

Please sign in to comment.