From b170ccc459f28edd467e6318534d971bbde4438f Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 9 Oct 2023 13:27:41 +0200 Subject: [PATCH] chore(staking): add delegator to events (#18006) --- x/staking/keeper/msg_server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 4743316b098f..7ae6a679e239 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -302,6 +302,7 @@ func (k msgServer) Delegate(ctx context.Context, msg *types.MsgDelegate) (*types sdk.NewEvent( types.EventTypeDelegate, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.String()), sdk.NewAttribute(types.AttributeKeyNewShares, newShares.String()), ), @@ -446,6 +447,7 @@ func (k msgServer) Undelegate(ctx context.Context, msg *types.MsgUndelegate) (*t sdk.NewEvent( types.EventTypeUnbond, sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, undelegatedCoin.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), ),