Skip to content

Commit

Permalink
fix(statemachine)!: allow overwriting of 29-fee payee to relayer addr…
Browse files Browse the repository at this point in the history
…ess (#5441)

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
  • Loading branch information
chandiniv1 and crodriguezvega authored Dec 19, 2023
1 parent 4c7621c commit 9c77534
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
4 changes: 0 additions & 4 deletions modules/apps/29-fee/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ func (msg MsgRegisterPayee) ValidateBasic() error {
return err
}

if msg.Relayer == msg.Payee {
return errorsmod.Wrap(ibcerrors.ErrInvalidRequest, "relayer address and payee must not be equal")
}

_, err := sdk.AccAddressFromBech32(msg.Relayer)
if err != nil {
return errorsmod.Wrap(err, "failed to create sdk.AccAddress from relayer address")
Expand Down
16 changes: 8 additions & 8 deletions modules/apps/29-fee/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ func TestMsgRegisterPayeeValidation(t *testing.T) {
true,
},
{
"invalid portID",
"success: relayer and payee are equal",
func() {
msg.PortId = ""
msg.Relayer = defaultAccAddress
msg.Payee = defaultAccAddress
},
false,
true,
},
{
"invalid channelID",
"invalid portID",
func() {
msg.ChannelId = ""
msg.PortId = ""
},
false,
},
{
"invalid request relayer and payee are equal",
"invalid channelID",
func() {
msg.Relayer = defaultAccAddress
msg.Payee = defaultAccAddress
msg.ChannelId = ""
},
false,
},
Expand Down

0 comments on commit 9c77534

Please sign in to comment.