Skip to content

Commit

Permalink
feat: add delegator to withdraw address (backport #15462) (#15472)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
3 people authored Mar 20, 2023
1 parent cbef7f3 commit 4151a58
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 @@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

* (x/distribution) [#15462](https://github.com/cosmos/cosmos-sdk/pull/15462) Add delegator address to the event for withdrawing delegation rewards.
* [#14609](https://github.com/cosmos/cosmos-sdk/pull/14609) Add RetryForBlocks method to use in tests that require waiting for a transaction to be included in a block.

### Deprecated
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 @@ -206,6 +206,7 @@ func (k Keeper) withdrawDelegationRewards(ctx sdk.Context, val stakingtypes.Vali
types.EventTypeWithdrawRewards,
sdk.NewAttribute(sdk.AttributeKeyAmount, finalRewards.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 @@ -11,4 +11,5 @@ const (

AttributeKeyWithdrawAddress = "withdraw_address"
AttributeKeyValidator = "validator"
AttributeKeyDelegator = "delegator"
)

0 comments on commit 4151a58

Please sign in to comment.