diff --git a/CHANGELOG.md b/CHANGELOG.md index dd42563d62f..76400b29b37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes * (apps/27-interchain-accounts) [\#5343](https://github.com/cosmos/ibc-go/pull/5343) Add check if controller is enabled in `sendTx` before sending packet to host. +* (apps/29-fee) [\#5441](https://github.com/cosmos/ibc-go/pull/5441) Allow setting the relayer address as payee. ## [v8.0.0](https://github.com/cosmos/ibc-go/releases/tag/v8.0.0) - 2023-11-10 diff --git a/modules/apps/29-fee/types/msgs.go b/modules/apps/29-fee/types/msgs.go index af2a9287a65..4972e636cf7 100644 --- a/modules/apps/29-fee/types/msgs.go +++ b/modules/apps/29-fee/types/msgs.go @@ -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") diff --git a/modules/apps/29-fee/types/msgs_test.go b/modules/apps/29-fee/types/msgs_test.go index 6f1d2bce4eb..4ab67340246 100644 --- a/modules/apps/29-fee/types/msgs_test.go +++ b/modules/apps/29-fee/types/msgs_test.go @@ -28,24 +28,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, },