From 80a4b7d3563d80fb45a78baa873ff458cbad34d7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:21:20 +0200 Subject: [PATCH] fix: fix signer in the commission rate message (backport #2107) (#2109) fix: fix signer in the commission rate message (#2107) init commit (cherry picked from commit 92cc24e227c0f334d6521f06a4128117ae6ee078) Co-authored-by: insumity --- proto/interchain_security/ccv/provider/v1/tx.proto | 2 +- x/ccv/provider/client/cli/tx.go | 3 ++- x/ccv/provider/types/msg.go | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/proto/interchain_security/ccv/provider/v1/tx.proto b/proto/interchain_security/ccv/provider/v1/tx.proto index 029ab9cf5a..468de6aaca 100644 --- a/proto/interchain_security/ccv/provider/v1/tx.proto +++ b/proto/interchain_security/ccv/provider/v1/tx.proto @@ -285,7 +285,7 @@ message MsgSetConsumerCommissionRate { ]; // signer address string signer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - } +} message MsgSetConsumerCommissionRateResponse {} diff --git a/x/ccv/provider/client/cli/tx.go b/x/ccv/provider/client/cli/tx.go index eadb3a7e57..4011a36a79 100644 --- a/x/ccv/provider/client/cli/tx.go +++ b/x/ccv/provider/client/cli/tx.go @@ -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 } diff --git a/x/ccv/provider/types/msg.go b/x/ccv/provider/types/msg.go index f74d8b9d78..b9cbf5a784 100644 --- a/x/ccv/provider/types/msg.go +++ b/x/ccv/provider/types/msg.go @@ -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, } }