Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix signer in the commission rate message (backport #2107) #2109

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/provider/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ message MsgSetConsumerCommissionRate {
];
// signer address
string signer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
}


message MsgSetConsumerCommissionRateResponse {}
Expand Down
3 changes: 2 additions & 1 deletion x/ccv/provider/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ func NewSetConsumerCommissionRateCmd() *cobra.Command {
if err != nil {
return err
}
msg := types.NewMsgSetConsumerCommissionRate(args[0], commission, sdk.ValAddress(providerValAddr))
signer := clientCtx.GetFromAddress().String()
msg := types.NewMsgSetConsumerCommissionRate(args[0], commission, sdk.ValAddress(providerValAddr), signer)
if err := msg.ValidateBasic(); err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion x/ccv/provider/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,12 @@ func (msg MsgOptOut) ValidateBasic() error {
}

// NewMsgSetConsumerCommissionRate creates a new MsgSetConsumerCommissionRate msg instance.
func NewMsgSetConsumerCommissionRate(chainID string, commission math.LegacyDec, providerValidatorAddress sdk.ValAddress) *MsgSetConsumerCommissionRate {
func NewMsgSetConsumerCommissionRate(chainID string, commission math.LegacyDec, providerValidatorAddress sdk.ValAddress, signer string) *MsgSetConsumerCommissionRate {
return &MsgSetConsumerCommissionRate{
ChainId: chainID,
Rate: commission,
ProviderAddr: providerValidatorAddress.String(),
Signer: signer,
}
}

Expand Down
Loading