From b656d37f7d5ef555435d9ef41e3e6994d0790ed4 Mon Sep 17 00:00:00 2001 From: tarumi Date: Tue, 31 Oct 2023 12:16:20 +0100 Subject: [PATCH] small fix --- x/registry/keeper/msg_server_withdraw_registration_fee.go | 4 +--- .../keeper/msg_server_withdraw_registration_fee_test.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/x/registry/keeper/msg_server_withdraw_registration_fee.go b/x/registry/keeper/msg_server_withdraw_registration_fee.go index b9fc87a0..c9881e25 100644 --- a/x/registry/keeper/msg_server_withdraw_registration_fee.go +++ b/x/registry/keeper/msg_server_withdraw_registration_fee.go @@ -10,8 +10,7 @@ import ( func (k msgServer) WithdrawRegistrationFee(goCtx context.Context, msg *types.MsgWithdrawRegistrationFee) (*types.MsgWithdrawRegistrationFeeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - - // Get top level domain + // Get top level domain topLevelDomain, found := k.Keeper.GetTopLevelDomain(ctx, msg.Name) if !found { return nil, errorsmod.Wrapf(types.ErrDomainNotFound, "%s", msg.Name) @@ -44,6 +43,5 @@ func (k msgServer) WithdrawRegistrationFee(goCtx context.Context, msg *types.Msg // Emit event EmitWithdrawRegistrationFeeEvent(ctx, *msg, registrationFee) - return &types.MsgWithdrawRegistrationFeeResponse{RegistrationFee: registrationFee}, nil } diff --git a/x/registry/keeper/msg_server_withdraw_registration_fee_test.go b/x/registry/keeper/msg_server_withdraw_registration_fee_test.go index 17d9476a..c71f2f95 100644 --- a/x/registry/keeper/msg_server_withdraw_registration_fee_test.go +++ b/x/registry/keeper/msg_server_withdraw_registration_fee_test.go @@ -86,7 +86,7 @@ func (suite *KeeperTestSuite) TestWithdrawRegistrationFee() { // Check top level domain topLevelDomain, found := suite.app.RegistryKeeper.GetTopLevelDomain(suite.ctx, tc.topLevelDomainName) suite.Require().True(found) - suite.Require().True(topLevelDomain.RegistrationFee.IsEqual(sdk.NewCoins())) + suite.Require().True(topLevelDomain.TotalWithdrawalAmount.IsEqual(sdk.NewCoins())) } else { suite.Require().EqualError(err, tc.expErr.Error())