Skip to content

Commit

Permalink
fix(distribution): wrong codec usage (#20463)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle authored May 28, 2024
1 parent cdc3845 commit e5b2bb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (staking) [#20444](https://github.com/cosmos/cosmos-sdk/pull/20444) Disable tokenization of shares from redelegations.

### Bugfixes

* (distribution) [#20463](https://github.com/cosmos/cosmos-sdk/pull/20463) Fix wrong
codec used for `MsgWithdrawTokenizeShareRecordReward.GetSignBytes()`.

## v0.47.13-ics-lsm

This is a special cosmos-sdk release with support for both ICS and LSM.
Expand Down
3 changes: 1 addition & 2 deletions x/distribution/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package types
import (
"errors"

"github.com/cosmos/cosmos-sdk/codec/legacy"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
Expand Down Expand Up @@ -253,7 +252,7 @@ func (msg MsgWithdrawTokenizeShareRecordReward) GetSigners() []sdk.AccAddress {

// get the bytes for the message signer to sign on
func (msg MsgWithdrawTokenizeShareRecordReward) GetSignBytes() []byte {
bz := legacy.Cdc.MustMarshalJSON(&msg)
bz := ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

Expand Down

0 comments on commit e5b2bb2

Please sign in to comment.