Skip to content

Commit

Permalink
fix: remove duplicated message type events (#1284)
Browse files Browse the repository at this point in the history
## Description

Currently, the `sdk.MessageEventType` is emitted twice in Desmos, it is
because that cosmos-sdk already handles the default message type event.
As we can see, [the example
transaction](https://testnet.bigdipper.live/desmos/transactions/F2340B9AFB6FF097085820B9F784251777FE43A700F0185E9542EF1AED914679)
has two message type event:
```json
[
    {
        "events": [
            {
                "type": "message",
                "attributes": [
                    {
                        "key": "action",
                        "value": "/desmos.posts.v3.MsgCreatePost"
                    },
                    {
                        "key": "sender",
                        "value": "desmos1q35n50xnlj7lapfkzzcq5rvypcvhure0rr945u"
                    }
                ]
            },
            {
                "type": "message",
                "attributes": [
                    {
                        "key": "module",
                        "value": "posts"
                    },
                    {
                        "key": "action",
                        "value": "/desmos.posts.v3.MsgCreatePost"
                    },
                    {
                        "key": "sender",
                        "value": "desmos1q35n50xnlj7lapfkzzcq5rvypcvhure0rr945u"
                    }
                ]
            },
         ...skip
]
``` 

To fix it, we can safely remove the `sdk.MessageEventType` event inside
Desmos modules.
References:
https://docs.cosmos.network/v0.47/learn/advanced/events#default-events

https://github.com/cosmos/cosmos-sdk/blob/v0.47.5/baseapp/baseapp.go#L848



<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR
Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration
[tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable
and please add
your handle next to the items reviewed if you only reviewed selected
items.*

I have...

- [ ] confirmed the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
dadamu authored Jan 8, 2024
1 parent 49c5d26 commit 4081830
Show file tree
Hide file tree
Showing 30 changed files with 12 additions and 923 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: fix
module: none
pull_request: 5299
description: 'fix: remove duplicated message type events'
backward_compatible: true
date: 2023-12-28T10:10:27.551132142Z
75 changes: 0 additions & 75 deletions x/posts/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ func (k msgServer) CreatePost(goCtx context.Context, msg *types.MsgCreatePost) (
}

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Author),
),
sdk.NewEvent(
types.EventTypeCreatePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -162,12 +156,6 @@ func (k msgServer) EditPost(goCtx context.Context, msg *types.MsgEditPost) (*typ
k.SavePost(ctx, updatedPost)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Editor),
),
sdk.NewEvent(
types.EventTypeEditPost,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -207,12 +195,6 @@ func (k msgServer) DeletePost(goCtx context.Context, msg *types.MsgDeletePost) (
k.Keeper.DeletePost(ctx, msg.SubspaceID, msg.PostID)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeDeletePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -313,12 +295,6 @@ func (k msgServer) AddPostAttachment(goCtx context.Context, msg *types.MsgAddPos
k.SavePost(ctx, post)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Editor),
),
sdk.NewEvent(
types.EventTypeAddPostAttachment,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -376,12 +352,6 @@ func (k msgServer) RemovePostAttachment(goCtx context.Context, msg *types.MsgRem
k.SavePost(ctx, post)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Editor),
),
sdk.NewEvent(
types.EventTypeRemovePostAttachment,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -461,12 +431,6 @@ func (k msgServer) AnswerPoll(goCtx context.Context, msg *types.MsgAnswerPoll) (
k.SaveUserAnswer(ctx, answer)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
),
sdk.NewEvent(
types.EventTypeAnswerPoll,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand All @@ -488,15 +452,6 @@ func (m msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam
ctx := sdk.UnwrapSDKContext(goCtx)
m.SetParams(ctx, msg.Params)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Authority),
),
})

return &types.MsgUpdateParamsResponse{}, nil
}

Expand Down Expand Up @@ -574,12 +529,6 @@ func (k msgServer) MovePost(goCtx context.Context, msg *types.MsgMovePost) (*typ
k.Keeper.DeletePost(ctx, msg.SubspaceID, msg.PostID)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Owner),
),
sdk.NewEvent(
types.EventTypeMovePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -636,12 +585,6 @@ func (k msgServer) RequestPostOwnerTransfer(goCtx context.Context, msg *types.Ms
))

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender),
),
sdk.NewEvent(
types.EventTypeRequestPostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -673,12 +616,6 @@ func (k msgServer) CancelPostOwnerTransferRequest(goCtx context.Context, msg *ty
k.DeletePostOwnerTransferRequest(ctx, msg.SubspaceID, msg.PostID)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender),
),
sdk.NewEvent(
types.EventTypeCancelPostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -735,12 +672,6 @@ func (k msgServer) AcceptPostOwnerTransferRequest(goCtx context.Context, msg *ty
k.DeletePostOwnerTransferRequest(ctx, msg.SubspaceID, msg.PostID)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Receiver),
),
sdk.NewEvent(
types.EventTypeAcceptPostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down Expand Up @@ -771,12 +702,6 @@ func (k msgServer) RefusePostOwnerTransferRequest(goCtx context.Context, msg *ty
k.DeletePostOwnerTransferRequest(ctx, msg.SubspaceID, msg.PostID)

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Receiver),
),
sdk.NewEvent(
types.EventTypeRefusePostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)),
Expand Down
99 changes: 1 addition & 98 deletions x/posts/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,6 @@ func (suite *KeeperTestSuite) TestMsgServer_CreatePost() {
CreationDate: time.Date(2020, 1, 1, 12, 00, 00, 000, time.UTC),
},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgCreatePost{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeCreatePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -485,12 +479,6 @@ func (suite *KeeperTestSuite) TestMsgServer_CreatePost() {
CreationDate: time.Date(2020, 1, 1, 12, 00, 00, 000, time.UTC),
},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgCreatePost{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeCreatePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -778,12 +766,6 @@ func (suite *KeeperTestSuite) TestMsgServer_EditPost() {
EditDate: time.Date(2021, 1, 1, 12, 00, 00, 000, time.UTC),
},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgEditPost{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeEditPost,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -985,12 +967,6 @@ func (suite *KeeperTestSuite) TestMsgServer_DeletePost() {
msg: types.NewMsgDeletePost(1, 1, "cosmos1r9jamre0x0qqy562rhhckt6sryztwhnvhafyz4"),
shouldErr: false,
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgDeletePost{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1r9jamre0x0qqy562rhhckt6sryztwhnvhafyz4"),
),
sdk.NewEvent(
types.EventTypeDeletePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -1042,12 +1018,6 @@ func (suite *KeeperTestSuite) TestMsgServer_DeletePost() {
},
msg: types.NewMsgDeletePost(1, 1, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgDeletePost{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeDeletePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -1289,12 +1259,6 @@ func (suite *KeeperTestSuite) TestMsgServer_AddPostAttachment() {
EditDate: time.Date(2021, 1, 1, 12, 00, 00, 000, time.UTC),
},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgAddPostAttachment{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeAddPostAttachment,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -1619,12 +1583,6 @@ func (suite *KeeperTestSuite) TestMsgServer_RemovePostAttachment() {
EditDate: time.Date(2021, 1, 1, 12, 00, 00, 000, time.UTC),
},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgRemovePostAttachment{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1r9jamre0x0qqy562rhhckt6sryztwhnvhafyz4"),
),
sdk.NewEvent(
types.EventTypeRemovePostAttachment,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -1707,12 +1665,6 @@ func (suite *KeeperTestSuite) TestMsgServer_RemovePostAttachment() {
EditDate: time.Date(2021, 1, 1, 12, 00, 00, 000, time.UTC),
},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgRemovePostAttachment{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeRemovePostAttachment,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -2235,12 +2187,6 @@ func (suite *KeeperTestSuite) TestMsgServer_AnswerPoll() {
),
shouldErr: false,
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgAnswerPoll{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeAnswerPoll,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -2322,12 +2268,6 @@ func (suite *KeeperTestSuite) TestMsgServer_AnswerPoll() {
),
shouldErr: false,
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgAnswerPoll{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeAnswerPoll,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -2403,14 +2343,7 @@ func (suite *KeeperTestSuite) TestMsgServer_UpdateParams() {
authtypes.NewModuleAddress("gov").String(),
),
shouldErr: false,
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgUpdateParams{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"),
),
},
expEvents: sdk.Events{},
check: func(ctx sdk.Context) {
params := suite.k.GetParams(ctx)
suite.Require().Equal(types.DefaultParams(), params)
Expand Down Expand Up @@ -2832,12 +2765,6 @@ func (suite *KeeperTestSuite) TestMsgServer_MovePost() {
),
shouldErr: false,
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgMovePost{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeMovePost,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -3227,12 +3154,6 @@ func (suite *KeeperTestSuite) TestMsgServer_RequestPostOwnerTransfer() {
),
expResponse: &types.MsgRequestPostOwnerTransferResponse{},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgRequestPostOwnerTransfer{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1eqpa6mv2jgevukaqtjmx5535vhc3mm3cf458zg"),
),
sdk.NewEvent(
types.EventTypeRequestPostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -3342,12 +3263,6 @@ func (suite *KeeperTestSuite) TestMsgServer_CancelPostOwnerTransfer() {
),
expResponse: &types.MsgCancelPostOwnerTransferRequestResponse{},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgCancelPostOwnerTransferRequest{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1eqpa6mv2jgevukaqtjmx5535vhc3mm3cf458zg"),
),
sdk.NewEvent(
types.EventTypeCancelPostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -3588,12 +3503,6 @@ func (suite *KeeperTestSuite) TestMsgServer_AcceptPostOwnerTransfer() {
),
expResponse: &types.MsgAcceptPostOwnerTransferRequestResponse{},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgAcceptPostOwnerTransferRequest{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeAcceptPostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down Expand Up @@ -3689,12 +3598,6 @@ func (suite *KeeperTestSuite) TestMsgServer_RefusePostOwnerTransfer() {
),
expResponse: &types.MsgRefusePostOwnerTransferRequestResponse{},
expEvents: sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgRefusePostOwnerTransferRequest{})),
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd"),
),
sdk.NewEvent(
types.EventTypeRefusePostOwnerTransfer,
sdk.NewAttribute(types.AttributeKeySubspaceID, "1"),
Expand Down
1 change: 0 additions & 1 deletion x/posts/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const (
EventTypeAcceptPostOwnerTransfer = "accept_post_owner_transfer"
EventTypeRefusePostOwnerTransfer = "refuse_post_owner_transfer"

AttributeValueCategory = ModuleName
AttributeKeySubspaceID = "subspace_id"
AttributeKeySectionID = "section_id"
AttributeKeyPostID = "post_id"
Expand Down
Loading

0 comments on commit 4081830

Please sign in to comment.