diff --git a/x/amm/keeper/msg_server_create_pool.go b/x/amm/keeper/msg_server_create_pool.go index cab1ab4a8..e7bcc5a44 100644 --- a/x/amm/keeper/msg_server_create_pool.go +++ b/x/amm/keeper/msg_server_create_pool.go @@ -5,8 +5,6 @@ import ( "strconv" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/elys-network/elys/x/amm/types" ) @@ -16,10 +14,6 @@ import ( func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) (*types.MsgCreatePoolResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - if k.authority != msg.Sender { - return nil, sdkerrors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Sender) - } - poolId, err := k.Keeper.CreatePool(ctx, msg) if err != nil { return &types.MsgCreatePoolResponse{}, err diff --git a/x/amm/keeper/msg_server_create_pool_test.go b/x/amm/keeper/msg_server_create_pool_test.go index 7a4bba790..eeb46d030 100644 --- a/x/amm/keeper/msg_server_create_pool_test.go +++ b/x/amm/keeper/msg_server_create_pool_test.go @@ -1,9 +1,8 @@ package keeper_test import ( + "github.com/cometbft/cometbft/crypto/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/elys-network/elys/x/amm/keeper" "github.com/elys-network/elys/x/amm/types" @@ -114,9 +113,7 @@ func (suite *KeeperTestSuite) TestMsgServerCreatePool() { suite.SetupStableCoinPrices() // bootstrap accounts - // sender := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) - // use gov address as sender - sender := authtypes.NewModuleAddress(govtypes.ModuleName) + sender := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) // bootstrap balances err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, tc.senderInitBalance) diff --git a/x/amm/keeper/msg_server_exit_pool_test.go b/x/amm/keeper/msg_server_exit_pool_test.go index a0b38ca4c..d6bd2d702 100644 --- a/x/amm/keeper/msg_server_exit_pool_test.go +++ b/x/amm/keeper/msg_server_exit_pool_test.go @@ -3,9 +3,8 @@ package keeper_test import ( "time" + "github.com/cometbft/cometbft/crypto/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/elys-network/elys/x/amm/keeper" "github.com/elys-network/elys/x/amm/types" @@ -116,9 +115,7 @@ func (suite *KeeperTestSuite) TestMsgServerExitPool() { suite.SetupStableCoinPrices() // bootstrap accounts - // sender := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) - // use gov address as sender - sender := authtypes.NewModuleAddress(govtypes.ModuleName) + sender := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) // bootstrap balances err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, tc.poolInitBalance)