Skip to content

Commit

Permalink
feat: add delegator to withdraw address (backport cosmos#15462) (cosm…
Browse files Browse the repository at this point in the history
…os#15473)

Co-authored-by: Marko <marbar3778@yahoo.com>
  • Loading branch information
2 people authored and JeancarloBarrios committed Sep 28, 2024
1 parent 7fc0480 commit 20d9e48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Improvements

* (simapp) [#15305](https://github.com/cosmos/cosmos-sdk/pull/15305) Add `AppStateFnWithExtendedCb` with callback function to extend rawState and `AppStateRandomizedFnWithState` with extra genesisState argument which is the genesis state of the app.
* (x/distribution) [#15462](https://github.com/cosmos/cosmos-sdk/pull/15462) Add delegator address to the event for withdrawing delegation rewards

### Bug Fixes

Expand Down
1 change: 1 addition & 0 deletions x/distribution/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ func (k Keeper) withdrawDelegationRewards(ctx sdk.Context, val stakingtypes.Vali
types.EventTypeWithdrawRewards,
sdk.NewAttribute(sdk.AttributeKeyAmount, emittedRewards.String()),
sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator().String()),
sdk.NewAttribute(types.AttributeKeyDelegator, del.GetDelegatorAddr().String()),
),
)

Expand Down
1 change: 1 addition & 0 deletions x/distribution/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ const (
AttributeKeyWithdrawAddress = "withdraw_address"
AttributeKeyValidator = "validator"
AttributeKeyDelegator = "delegator"
AttributeValueCategory = ModuleName
)

0 comments on commit 20d9e48

Please sign in to comment.