From 0a7aad4c823f9fa964227a73741ac24a33b7904d Mon Sep 17 00:00:00 2001 From: poorphd Date: Mon, 1 Jul 2024 19:10:12 +0900 Subject: [PATCH] refactor: Replace deprecated simapp.MakeTestEncodingConfig with moduletestutil.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. --- x/coinswap/simulation/operations.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/coinswap/simulation/operations.go b/x/coinswap/simulation/operations.go index 2b2f7fbf0..6ad47484d 100644 --- a/x/coinswap/simulation/operations.go +++ b/x/coinswap/simulation/operations.go @@ -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" ) @@ -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, @@ -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, @@ -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,