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: rm bech32 check from owner address on ICA controller msgs RegisterInterchainAccount and SendTx #2601

Merged
merged 7 commits into from
Oct 31, 2022
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ func (msg MsgRegisterInterchainAccount) ValidateBasic() error {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "owner address cannot be empty")
}

if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "failed to parse owner address: %s", msg.Owner)
}

return nil
}

Expand Down Expand Up @@ -68,10 +64,6 @@ func (msg MsgSendTx) ValidateBasic() error {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "owner address cannot be empty")
}

if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "failed to parse owner address: %s", msg.Owner)
}

if err := msg.PacketData.ValidateBasic(); err != nil {
return sdkerrors.Wrap(err, "invalid interchain account packet data")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ func TestMsgRegisterInterchainAccountValidateBasic(t *testing.T) {
},
false,
},
{
"owner address is invalid",
func() {
msg.Owner = "invalid_address"
},
false,
},
}

for i, tc := range testCases {
Expand Down Expand Up @@ -125,13 +118,6 @@ func TestMsgSendTxValidateBasic(t *testing.T) {
},
false,
},
{
"owner address is invalid",
func() {
msg.Owner = "invalid_address"
},
false,
},
{
"relative timeout is not set",
func() {
Expand Down