Skip to content

Commit a30144b

Browse files
authored
fix: add missing events and event attributes (#829)
## Description This PR adds missing attributes (and events) from handlers where needed. <!-- 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 - [x] 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) - [x] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] 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)
1 parent 3889686 commit a30144b

14 files changed

+112
-28
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
type: fix
2+
module: other
3+
pull_request: 829
4+
description: Added missing events and events attributes
5+
backward_compatible: true
6+
date: 2022-04-21T07:31:55.785338327Z

x/profiles/keeper/msg_server_app_link.go

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func (k Keeper) LinkApplication(
5050
sdk.NewEvent(
5151
sdk.EventTypeMessage,
5252
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
53+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
5354
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender),
5455
),
5556
sdk.NewEvent(
@@ -91,6 +92,7 @@ func (k msgServer) UnlinkApplication(
9192
sdk.NewEvent(
9293
sdk.EventTypeMessage,
9394
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
95+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
9496
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
9597
),
9698
sdk.NewEvent(

x/profiles/keeper/msg_server_chain_link.go

+29-13
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,21 @@ func (k msgServer) LinkChainAccount(goCtx context.Context, msg *types.MsgLinkCha
2525
return nil, err
2626
}
2727

28-
ctx.EventManager().EmitEvent(sdk.NewEvent(
29-
types.EventTypeLinkChainAccount,
30-
sdk.NewAttribute(types.AttributeKeyChainLinkSourceAddress, srcAddrData.GetValue()),
31-
sdk.NewAttribute(types.AttributeKeyChainLinkSourceChainName, msg.ChainConfig.Name),
32-
sdk.NewAttribute(types.AttributeKeyChainLinkDestinationAddress, msg.Signer),
33-
sdk.NewAttribute(types.AttributeKeyChainLinkCreationTime, link.CreationTime.Format(time.RFC3339Nano)),
34-
))
28+
ctx.EventManager().EmitEvents(sdk.Events{
29+
sdk.NewEvent(
30+
sdk.EventTypeMessage,
31+
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
32+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
33+
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
34+
),
35+
sdk.NewEvent(
36+
types.EventTypeLinkChainAccount,
37+
sdk.NewAttribute(types.AttributeKeyChainLinkSourceAddress, srcAddrData.GetValue()),
38+
sdk.NewAttribute(types.AttributeKeyChainLinkSourceChainName, msg.ChainConfig.Name),
39+
sdk.NewAttribute(types.AttributeKeyChainLinkDestinationAddress, msg.Signer),
40+
sdk.NewAttribute(types.AttributeKeyChainLinkCreationTime, link.CreationTime.Format(time.RFC3339Nano)),
41+
),
42+
})
3543

3644
return &types.MsgLinkChainAccountResponse{}, nil
3745
}
@@ -48,12 +56,20 @@ func (k msgServer) UnlinkChainAccount(goCtx context.Context, msg *types.MsgUnlin
4856
// Delete the link
4957
k.DeleteChainLink(ctx, link)
5058

51-
ctx.EventManager().EmitEvent(sdk.NewEvent(
52-
types.EventTypeUnlinkChainAccount,
53-
sdk.NewAttribute(types.AttributeKeyChainLinkSourceAddress, msg.Target),
54-
sdk.NewAttribute(types.AttributeKeyChainLinkSourceChainName, msg.ChainName),
55-
sdk.NewAttribute(types.AttributeKeyChainLinkDestinationAddress, msg.Owner),
56-
))
59+
ctx.EventManager().EmitEvents(sdk.Events{
60+
sdk.NewEvent(
61+
sdk.EventTypeMessage,
62+
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
63+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
64+
sdk.NewAttribute(sdk.AttributeKeySender, msg.Owner),
65+
),
66+
sdk.NewEvent(
67+
types.EventTypeUnlinkChainAccount,
68+
sdk.NewAttribute(types.AttributeKeyChainLinkSourceAddress, msg.Target),
69+
sdk.NewAttribute(types.AttributeKeyChainLinkSourceChainName, msg.ChainName),
70+
sdk.NewAttribute(types.AttributeKeyChainLinkDestinationAddress, msg.Owner),
71+
),
72+
})
5773

5874
return &types.MsgUnlinkChainAccountResponse{}, nil
5975
}

x/profiles/keeper/msg_server_chain_link_test.go

+12
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ func (suite *KeeperTestSuite) TestMsgServer_LinkChainAccount() {
107107
),
108108
shouldErr: false,
109109
expEvents: sdk.Events{
110+
sdk.NewEvent(
111+
sdk.EventTypeMessage,
112+
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
113+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgLinkChainAccount{})),
114+
sdk.NewAttribute(sdk.AttributeKeySender, destAddr),
115+
),
110116
sdk.NewEvent(
111117
types.EventTypeLinkChainAccount,
112118
sdk.NewAttribute(types.AttributeKeyChainLinkSourceAddress, srcAddr),
@@ -198,6 +204,12 @@ func (suite *KeeperTestSuite) TestMsgServer_UnlinkChainAccount() {
198204
),
199205
shouldErr: false,
200206
expEvents: sdk.Events{
207+
sdk.NewEvent(
208+
sdk.EventTypeMessage,
209+
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
210+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgUnlinkChainAccount{})),
211+
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
212+
),
201213
sdk.NewEvent(
202214
types.EventTypeUnlinkChainAccount,
203215
sdk.NewAttribute(types.AttributeKeyChainLinkSourceAddress, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),

x/profiles/keeper/msg_server_dtag_transfers.go

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func (k msgServer) RequestDTagTransfer(goCtx context.Context, msg *types.MsgRequ
4646
sdk.NewEvent(
4747
sdk.EventTypeMessage,
4848
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
49+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
4950
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender),
5051
),
5152
sdk.NewEvent(
@@ -74,6 +75,7 @@ func (k msgServer) CancelDTagTransferRequest(goCtx context.Context, msg *types.M
7475
sdk.NewEvent(
7576
sdk.EventTypeMessage,
7677
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
78+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
7779
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender),
7880
),
7981
sdk.NewEvent(
@@ -178,6 +180,7 @@ func (k msgServer) AcceptDTagTransferRequest(goCtx context.Context, msg *types.M
178180
sdk.NewEvent(
179181
sdk.EventTypeMessage,
180182
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
183+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
181184
sdk.NewAttribute(sdk.AttributeKeySender, msg.Receiver),
182185
),
183186
sdk.NewEvent(
@@ -207,6 +210,7 @@ func (k msgServer) RefuseDTagTransferRequest(goCtx context.Context, msg *types.M
207210
sdk.NewEvent(
208211
sdk.EventTypeMessage,
209212
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
213+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
210214
sdk.NewAttribute(sdk.AttributeKeySender, msg.Receiver),
211215
),
212216
sdk.NewEvent(

x/profiles/keeper/msg_server_dtag_transfers_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ func (suite *KeeperTestSuite) TestMsgServer_RequestDTagTransfer() {
8080
sdk.NewEvent(
8181
sdk.EventTypeMessage,
8282
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
83+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgRequestDTagTransfer{})),
8384
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
8485
),
8586
sdk.NewEvent(
@@ -148,6 +149,7 @@ func (suite *KeeperTestSuite) TestMsgServer_CancelDTagTransfer() {
148149
sdk.NewEvent(
149150
sdk.EventTypeMessage,
150151
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
152+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgCancelDTagTransferRequest{})),
151153
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
152154
),
153155
sdk.NewEvent(
@@ -290,6 +292,7 @@ func (suite *KeeperTestSuite) TestMsgServer_AcceptDTagTransfer() {
290292
sdk.NewEvent(
291293
sdk.EventTypeMessage,
292294
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
295+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgAcceptDTagTransferRequest{})),
293296
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),
294297
),
295298
sdk.NewEvent(
@@ -324,6 +327,7 @@ func (suite *KeeperTestSuite) TestMsgServer_AcceptDTagTransfer() {
324327
sdk.NewEvent(
325328
sdk.EventTypeMessage,
326329
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
330+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgAcceptDTagTransferRequest{})),
327331
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),
328332
),
329333
sdk.NewEvent(
@@ -360,6 +364,7 @@ func (suite *KeeperTestSuite) TestMsgServer_AcceptDTagTransfer() {
360364
sdk.NewEvent(
361365
sdk.EventTypeMessage,
362366
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
367+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgAcceptDTagTransferRequest{})),
363368
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),
364369
),
365370
sdk.NewEvent(
@@ -441,6 +446,7 @@ func (suite *KeeperTestSuite) TestMsgServer_RefuseDTagTransfer() {
441446
sdk.NewEvent(
442447
sdk.EventTypeMessage,
443448
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
449+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgRefuseDTagTransferRequest{})),
444450
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),
445451
),
446452
sdk.NewEvent(

x/profiles/keeper/msgs_server_profile.go

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func (k msgServer) SaveProfile(goCtx context.Context, msg *types.MsgSaveProfile)
7070
sdk.NewEvent(
7171
sdk.EventTypeMessage,
7272
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
73+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
7374
sdk.NewAttribute(sdk.AttributeKeySender, msg.Creator),
7475
),
7576
sdk.NewEvent(
@@ -95,6 +96,7 @@ func (k msgServer) DeleteProfile(goCtx context.Context, msg *types.MsgDeleteProf
9596
sdk.NewEvent(
9697
sdk.EventTypeMessage,
9798
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
99+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
98100
sdk.NewAttribute(sdk.AttributeKeySender, msg.Creator),
99101
),
100102
sdk.NewEvent(

x/profiles/keeper/msgs_server_profile_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func (suite *KeeperTestSuite) TestMsgServer_SaveProfile() {
4444
sdk.NewEvent(
4545
sdk.EventTypeMessage,
4646
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
47+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgSaveProfile{})),
4748
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos10nsdxxdvy9qka3zv0lzw8z9cnu6kanld8jh773"),
4849
),
4950
sdk.NewEvent(
@@ -83,6 +84,7 @@ func (suite *KeeperTestSuite) TestMsgServer_SaveProfile() {
8384
sdk.NewEvent(
8485
sdk.EventTypeMessage,
8586
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
87+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgSaveProfile{})),
8688
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos10nsdxxdvy9qka3zv0lzw8z9cnu6kanld8jh773"),
8789
),
8890
sdk.NewEvent(
@@ -128,6 +130,7 @@ func (suite *KeeperTestSuite) TestMsgServer_SaveProfile() {
128130
sdk.NewEvent(
129131
sdk.EventTypeMessage,
130132
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
133+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgSaveProfile{})),
131134
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos10nsdxxdvy9qka3zv0lzw8z9cnu6kanld8jh773"),
132135
),
133136
sdk.NewEvent(
@@ -211,6 +214,7 @@ func (suite *KeeperTestSuite) TestMsgServer_SaveProfile() {
211214
sdk.NewEvent(
212215
sdk.EventTypeMessage,
213216
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
217+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgSaveProfile{})),
214218
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),
215219
),
216220
sdk.NewEvent(
@@ -307,6 +311,7 @@ func (suite *KeeperTestSuite) TestMsgServer_DeleteProfile() {
307311
sdk.NewEvent(
308312
sdk.EventTypeMessage,
309313
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
314+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgDeleteProfile{})),
310315
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos10nsdxxdvy9qka3zv0lzw8z9cnu6kanld8jh773"),
311316
),
312317
sdk.NewEvent(

x/profiles/types/events.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ package types
33
// DONTCOVER
44

55
const (
6-
EventTypeProfileSaved = "profile_saved"
7-
EventTypeProfileDeleted = "profile_deleted"
8-
EventTypeDTagTransferRequest = "dtag_transfer_request"
9-
EventTypeDTagTransferAccept = "dtag_transfer_accept"
10-
EventTypeDTagTransferRefuse = "dtag_transfer_refuse"
11-
EventTypeDTagTransferCancel = "dtag_transfer_cancel"
6+
EventTypeProfileSaved = "save_profile"
7+
EventTypeProfileDeleted = "delete_profile"
8+
EventTypeDTagTransferRequest = "create_dtag_transfer_request"
9+
EventTypeDTagTransferAccept = "accept_dtag_transfer_request"
10+
EventTypeDTagTransferRefuse = "refuse_dtag_transfer_request"
11+
EventTypeDTagTransferCancel = "cancel_dtag_transfer_request"
1212
EventTypeLinkChainAccount = "link_chain_account"
1313
EventTypeUnlinkChainAccount = "unlink_chain_account"
1414
EventTypeLinkChainAccountPacket = "link_chain_account_packet"
15-
EventTypePacket = "profiles_verification_packet"
15+
EventTypePacket = "receive_profiles_verification_packet"
1616
EventTypeTimeout = "timeout"
17-
EventTypesApplicationLinkCreated = "application_link_created"
17+
EventTypesApplicationLinkCreated = "link_application"
18+
EventTypeApplicationLinkDeleted = "unlink_application"
1819
EventTypesApplicationLinkSaved = "application_link_saved"
19-
EventTypeApplicationLinkDeleted = "application_link_deleted"
2020

2121
AttributeKeyProfileDTag = "profile_dtag"
2222
AttributeKeyProfileCreator = "profile_creator"

x/relationships/keeper/msg_server.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ func (k msgServer) CreateRelationship(goCtx context.Context, msg *types.MsgCreat
4949
sdk.NewEvent(
5050
sdk.EventTypeMessage,
5151
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
52+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
5253
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
5354
),
5455
sdk.NewEvent(
@@ -83,10 +84,11 @@ func (k msgServer) DeleteRelationship(goCtx context.Context, msg *types.MsgDelet
8384
sdk.NewEvent(
8485
sdk.EventTypeMessage,
8586
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
87+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
8688
sdk.NewAttribute(sdk.AttributeKeySender, msg.Signer),
8789
),
8890
sdk.NewEvent(
89-
types.EventTypeRelationshipsDeleted,
91+
types.EventTypeRelationshipDeleted,
9092
sdk.NewAttribute(types.AttributeRelationshipCreator, msg.Signer),
9193
sdk.NewAttribute(types.AttributeRelationshipCounterparty, msg.Counterparty),
9294
sdk.NewAttribute(types.AttributeKeySubspace, fmt.Sprintf("%d", msg.SubspaceID)),
@@ -117,6 +119,7 @@ func (k msgServer) BlockUser(goCtx context.Context, msg *types.MsgBlockUser) (*t
117119
sdk.NewEvent(
118120
sdk.EventTypeMessage,
119121
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
122+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
120123
sdk.NewAttribute(sdk.AttributeKeySender, msg.Blocker),
121124
),
122125
sdk.NewEvent(
@@ -151,6 +154,7 @@ func (k msgServer) UnblockUser(goCtx context.Context, msg *types.MsgUnblockUser)
151154
sdk.NewEvent(
152155
sdk.EventTypeMessage,
153156
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
157+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(msg)),
154158
sdk.NewAttribute(sdk.AttributeKeySender, msg.Blocker),
155159
),
156160
sdk.NewEvent(

x/relationships/keeper/msg_server_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func (suite *KeeperTestSuite) TestMsgServer_CreateRelationship() {
9494
sdk.NewEvent(
9595
sdk.EventTypeMessage,
9696
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
97+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgCreateRelationship{})),
9798
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
9899
),
99100
sdk.NewEvent(
@@ -205,10 +206,11 @@ func (suite *KeeperTestSuite) TestMsgServer_DeleteRelationship() {
205206
sdk.NewEvent(
206207
sdk.EventTypeMessage,
207208
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
209+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgDeleteRelationship{})),
208210
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
209211
),
210212
sdk.NewEvent(
211-
types.EventTypeRelationshipsDeleted,
213+
types.EventTypeRelationshipDeleted,
212214
sdk.NewAttribute(types.AttributeRelationshipCreator, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
213215
sdk.NewAttribute(types.AttributeRelationshipCounterparty, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),
214216
sdk.NewAttribute(types.AttributeKeySubspace, "1"),
@@ -319,6 +321,7 @@ func (suite *KeeperTestSuite) TestMsgServer_BlockUser() {
319321
sdk.NewEvent(
320322
sdk.EventTypeMessage,
321323
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
324+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgBlockUser{})),
322325
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
323326
),
324327
sdk.NewEvent(
@@ -431,6 +434,7 @@ func (suite *KeeperTestSuite) TestMsgServer_UnblockUser() {
431434
sdk.NewEvent(
432435
sdk.EventTypeMessage,
433436
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
437+
sdk.NewAttribute(sdk.AttributeKeyAction, sdk.MsgTypeURL(&types.MsgUnblockUser{})),
434438
sdk.NewAttribute(sdk.AttributeKeySender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
435439
),
436440
sdk.NewEvent(

x/relationships/types/events.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package types
33
// DONTCOVER
44

55
const (
6-
EventTypeRelationshipCreated = "relationship_created"
7-
EventTypeRelationshipsDeleted = "relationships_deleted"
8-
EventTypeBlockUser = "block_user"
9-
EventTypeUnblockUser = "unblock_user"
6+
EventTypeRelationshipCreated = "create_relationship"
7+
EventTypeRelationshipDeleted = "delete_relationship"
8+
EventTypeBlockUser = "block_user"
9+
EventTypeUnblockUser = "unblock_user"
1010

1111
AttributeValueCategory = ModuleName
1212
AttributeRelationshipCreator = "creator"

0 commit comments

Comments
 (0)