Skip to content

Commit

Permalink
feat: add delegator to withdraw address (backport #15462) (#15473)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <marbar3778@yahoo.com>
  • Loading branch information
mergify[bot] and tac0turtle committed Mar 20, 2023
1 parent 8726f42 commit 31adbba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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 @@ -205,6 +205,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
4 changes: 2 additions & 2 deletions x/distribution/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ const (

AttributeKeyWithdrawAddress = "withdraw_address"
AttributeKeyValidator = "validator"

AttributeValueCategory = ModuleName
AttributeKeyDelegator = "delegator"
AttributeValueCategory = ModuleName
)

0 comments on commit 31adbba

Please sign in to comment.