Skip to content

Commit

Permalink
fix: inconsistent event names
Browse files Browse the repository at this point in the history
Signed-off-by: Riccardo Montagnin <[email protected]>
  • Loading branch information
RiccardoM committed Feb 7, 2024
1 parent ef1858d commit f937baf
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion x/profiles/keeper/msg_server_dtag_transfers.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (k MsgServer) RequestDTagTransfer(goCtx context.Context, msg *types.MsgRequ

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
types.EventTypeRequestedDTagTransferRequest,
types.EventTypeRequestedDTagTransfer,
sdk.NewAttribute(types.AttributeKeyDTagToTrade, dTagToTrade),
sdk.NewAttribute(types.AttributeKeyRequestSender, transferRequest.Sender),
sdk.NewAttribute(types.AttributeKeyRequestReceiver, transferRequest.Receiver),
Expand Down
2 changes: 1 addition & 1 deletion x/profiles/keeper/msg_server_dtag_transfers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (suite *KeeperTestSuite) TestMsgServer_RequestDTagTransfer() {
shouldErr: false,
expEvents: sdk.Events{
sdk.NewEvent(
types.EventTypeRequestedDTagTransferRequest,
types.EventTypeRequestedDTagTransfer,
sdk.NewAttribute(types.AttributeKeyDTagToTrade, fmt.Sprintf("%s-dtag", "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns")),
sdk.NewAttribute(types.AttributeKeyRequestSender, "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"),
sdk.NewAttribute(types.AttributeKeyRequestReceiver, "cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns"),
Expand Down
16 changes: 8 additions & 8 deletions x/profiles/spec/05-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ The profiles module emits the following events:

## MsgRequestDTagTransfer

| **Type** | **Attribute Key** | **Attribute Value** |
|:------------------------------|:------------------|:------------------------------------------|
| created_dtag_transfer_request | dtag_to_trade | {dTagToTrade} |
| created_dtag_transfer_request | request_sender | {requestSenderAddress} |
| created_dtag_transfer_request | request_receiver | {requestReceiverAddress} |
| message | module | profiles |
| message | action | desmos.profiles.v3.MsgRequestDTagTransfer |
| message | sender | {requestSenderAddress} |
| **Type** | **Attribute Key** | **Attribute Value** |
|:------------------------|:------------------|:------------------------------------------|
| requested_dtag_transfer | dtag_to_trade | {dTagToTrade} |
| requested_dtag_transfer | request_sender | {requestSenderAddress} |
| requested_dtag_transfer | request_receiver | {requestReceiverAddress} |
| message | module | profiles |
| message | action | desmos.profiles.v3.MsgRequestDTagTransfer |
| message | sender | {requestSenderAddress} |

## MsgCancelDTagTransferRequest

Expand Down
2 changes: 1 addition & 1 deletion x/profiles/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const (
EventTypeSavedProfile = "saved_profile"
EventTypeDeletedProfile = "deleted_profile"

EventTypeRequestedDTagTransferRequest = "created_dtag_transfer_request"
EventTypeRequestedDTagTransfer = "requested_dtag_transfer"
EventTypeAcceptedDTagTransferRequest = "accepted_dtag_transfer_request"
EventTypeRefusedDTagTransferRequest = "refused_dtag_transfer_request"
EventTypeCanceledDTagTransferRequest = "canceled_dtag_transfer_request"
Expand Down
4 changes: 2 additions & 2 deletions x/reports/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const (
EventTypeReportedUser = "reported_user"
EventTypeDeletedReport = "deleted_report"
EventTypeSupportedStandardReason = "supported_standard_reason"
EventTypeAddedReportingReason = "added_reason"
EventTypeRemovedReportingReason = "removed_reason"
EventTypeAddedReportingReason = "added_reporting_reason"
EventTypeRemovedReportingReason = "removed_reporting_reason"

AttributeKeyReportID = "report_id"
AttributeKeyReporter = "reporter"
Expand Down

0 comments on commit f937baf

Please sign in to comment.