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(statemachine)!: allow overwriting of 29-fee payee to relayer address #5441

Merged
merged 5 commits into from
Dec 19, 2023
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
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
Loading