Skip to content

Commit

Permalink
fix: rm bech32 check from owner address on ICA controller msgs Regist…
Browse files Browse the repository at this point in the history
…erInterchainAccount and SendTx (#2601)

* rm validate basic owner address check

(cherry picked from commit e8ff311)
  • Loading branch information
charleenfei authored and mergify[bot] committed Oct 31, 2022
1 parent 4b0b5af commit f46317e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
8 changes: 0 additions & 8 deletions modules/apps/27-interchain-accounts/controller/types/msgs.go
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
14 changes: 0 additions & 14 deletions modules/apps/27-interchain-accounts/controller/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,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 @@ -124,13 +117,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

0 comments on commit f46317e

Please sign in to comment.