Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Oct 31, 2023
1 parent 9bce4d1 commit b656d37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions x/registry/keeper/msg_server_withdraw_registration_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit b656d37

Please sign in to comment.