Skip to content

Commit

Permalink
fix: fix signer in the commission rate message (#2107)
Browse files Browse the repository at this point in the history
init commit
  • Loading branch information
insumity authored Jul 29, 2024
1 parent 8e10224 commit 92cc24e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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

0 comments on commit 92cc24e

Please sign in to comment.